I am the only developer, and I have three computers - home, travel, remote. Remote contains my remote repository, home is my home development machine, and travel is what I use when I travel. When I travel, I push all the changes to my projects to remote, then pull them to the various projects on my travel machine. When I come home, I reverse the process and push all the changes on travel to remote, and then pull them down to home.
I seem to have messed up a step and now have conflicts after my last trip when pushing a project to remote from travel. I must have forgotten to update travel and then made changes to travel.
The conflict is down to one file, but it is a big kicad schematic text file and I don't understand it enough to make line by line changes. How do I just tell git on travel that everything on travel for this project should go to remote and just wipe out whatever is on remote in favor of what is on travel for this project?
Thanks!
The output from git push on travel:
(rocket_launcher_flask) mark@octopus:~/python-projects/rocket_launcher_flask$ git push
To swordfish:/home/mark/git-repo/rocket_launcher_flask.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'mark@swordfish:/home/mark/git-repo/rocket_launcher_flask.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I then tried:
(rocket_launcher_flask) mark@octopus:~/python-projects/rocket_launcher_flask$ git pull origin master
remote: Enumerating objects: 216, done.
remote: Counting objects: 100% (216/216), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 114 (delta 61), reused 114 (delta 61)
Receiving objects: 100% (114/114), 192.30 KiB | 713.00 KiB/s, done.
Resolving deltas: 100% (61/61), completed with 54 local objects.
From swordfish:/home/mark/git-repo/rocket_launcher_flask
* branch master -> FETCH_HEAD
813ae76..e29888c master -> origin/master
Auto-merging rocket_launcher_flask.wpu
CONFLICT (content): Merge conflict in rocket_launcher_flask.wpu
Removing bugs.ods
Auto-merging Expansion_Board/rocket_launcher_expansion_board/rocket_launcher_expansion_board.kicad_sch
CONFLICT (content): Merge conflict in Expansion_Board/rocket_launcher_expansion_board/rocket_launcher_expansion_board.kicad_sch
CONFLICT (file location): Expansion Board/rocket_launcher_expansion_board/rocket_launcher_expansion_board-backups/rocket_launcher_expansion_board-2022-09-13_224453.zip added in e29888c7a685c50c0afe5d290e84ad126b02db6a inside a directory that was renamed in HEAD, suggesting it should perhaps be moved to Expansion_Board/rocket_launcher_expansion_board/rocket_launcher_expansion_board-backups/rocket_launcher_expansion_board-2022-09-13_224453.zip.
Automatic merge failed; fix conflicts and then commit the result.