I already have a backup and did merging the "old school" way - but now I'm trying to do it the git way !
We have 3 branches master API (mine) WebGUI (MaVo's) and I'm trying to merge MaVo's WebGUI branch into mine. I made a pull request and was pleasantly surpised to the auto-merge and views of the changes (well done Git & GitHub).. I was excited that only 3 files were in conflict. I know the changes at the moment I want to keep all the changes on my branch which include 2 modified files & 1 delete
This is were I am in the process :
C:\>cd mrl\myrobotlab
C:\mrl\myrobotlab>git fetch origin
C:\mrl\myrobotlab>git checkout -b WebGUI origin/WebGUI
Unlink of file 'build-lib/tools.jar' failed. Should I try again? (y/n) y
Unlink of file 'build-lib/tools.jar' failed. Should I try again? (y/n) y
Unlink of file 'build-lib/tools.jar' failed. Should I try again? (y/n) y
Checking out files: 100% (183/183), done.
M src/org/myrobotlab/kinematics/DHLink.java
M src/resource/Arduino/MRLComm.ino
Branch WebGUI set up to track remote branch WebGUI from origin.
Switched to a new branch 'WebGUI'
C:\mrl\myrobotlab>git merge API
Auto-merging src/resource/WebGUI/js/app.js
CONFLICT (add/add): Merge conflict in src/resource/WebGUI/js/app.js
Auto-merging src/resource/WebGUI/index.html
CONFLICT (add/add): Merge conflict in src/resource/WebGUI/index.html
Removing src/org/myrobotlab/webgui/WSServer.java
Removing src/org/myrobotlab/webgui/SOAPProcessor.java
Removing src/org/myrobotlab/webgui/ReturnType.java
Removing src/org/myrobotlab/webgui/ResourceProcessor.java
Removing src/org/myrobotlab/webgui/RESTProcessor.java
Removing src/org/myrobotlab/webgui/REST.java
Removing src/org/myrobotlab/service/interfaces/HTTPProcessor.java
CONFLICT (modify/delete): src/org/myrobotlab/service/WebGUI2.java deleted in API and modified in HEAD. Version HEAD of s
rc/org/myrobotlab/service/WebGUI2.java left in tree.
Removing src/org/myrobotlab/service/SpeechRecognitionGoogle.java
Removing src/org/myrobotlab/service/SpeakerRecognition.java
Removing src/org/myrobotlab/service/Cortex.java
Removing src/org/myrobotlab/net/http/ResponseException.java
Removing src/org/myrobotlab/net/http/Response.java
Removing src/org/myrobotlab/framework/MessageFormatter.java
Removing src/org/myrobotlab/framework/MRLError.java
Removing src/org/myrobotlab/framework/Errors.java
Removing src/org/myrobotlab/control/CortexGUI.java
Auto-merging src/org/myrobotlab/codec/serial/HexCodec.java
Auto-merging src/org/myrobotlab/codec/serial/DecimalCodec.java
Auto-merging src/org/myrobotlab/codec/serial/CodecOutputStream.java
Auto-merging src/org/myrobotlab/codec/serial/AsciiCodec.java
Auto-merging src/org/myrobotlab/codec/serial/ArduinoMsgCodec.java
Auto-merging src/org/myrobotlab/codec/serial/ArduinoBindingsGenerator.java
Auto-merging src/org/myrobotlab/codec/Encoder.java
Removing docs/multiParameter.dia
Removing docs/kinect.png
Removing docs/attach.dia
Automatic merge failed; fix conflicts and then commit the result.
C:\mrl\myrobotlab>git checkout src/resource/WebGUI/js/app.js
error: path 'src/resource/WebGUI/js/app.js' is unmerged
C:\mrl\myrobotlab>git reset src/resource/WebGUI/js/app.js
Unstaged changes after reset:
M src/org/myrobotlab/kinematics/DHLink.java
U src/org/myrobotlab/service/WebGUI2.java
M src/resource/Arduino/MRLComm.ino
U src/resource/WebGUI/index.html
M src/resource/WebGUI/js/app.js
C:\mrl\myrobotlab>git checkout src/resource/WebGUI/js/app.js
C:\mrl\myrobotlab>git reset src/resource/WebGUI/index.html
Unstaged changes after reset:
M src/org/myrobotlab/kinematics/DHLink.java
U src/org/myrobotlab/service/WebGUI2.java
M src/resource/Arduino/MRLComm.ino
M src/resource/WebGUI/index.html
C:\mrl\myrobotlab>git checkout src/resource/WebGUI/index.html
C:\mrl\myrobotlab>del src/org/myrobotlab/service/WebGUI2.java
Invalid switch - "org".
C:\mrl\myrobotlab>del src\org\myrobotlab\service\WebGUI2.java
C:\mrl\myrobotlab>git checkout API
src/org/myrobotlab/service/WebGUI2.java: needs merge
error: you need to resolve your current index first
C:\mrl\myrobotlab>git commit
U src/org/myrobotlab/service/WebGUI2.java
error: 'commit' is not possible because you have unmerged files.
hint: Fix them up in the work tree,
hint: and then use 'git add/rm <file>' as
hint: appropriate to mark resolution and make a commit,
hint: or use 'git commit -a'.
fatal: Exiting because of an unresolved conflict.
C:\mrl\myrobotlab>git rm src\org\myrobotlab\service\WebGUI2.java
src/org/myrobotlab/service/WebGUI2.java: needs merge
rm 'src/org/myrobotlab/service/WebGUI2.java'
C:\mrl\myrobotlab>git checkout API
M src/org/myrobotlab/kinematics/DHLink.java
M src/resource/Arduino/MRLComm.ino
Switched to branch 'API'
Your branch is up-to-date with 'origin/API'.
C:\mrl\myrobotlab>git merge --no-ff WebGUI
Auto-merging src/resource/WebGUI/js/app.js
CONFLICT (add/add): Merge conflict in src/resource/WebGUI/js/app.js
Auto-merging src/resource/WebGUI/index.html
CONFLICT (add/add): Merge conflict in src/resource/WebGUI/index.html
CONFLICT (modify/delete): src/org/myrobotlab/service/WebGUI2.java deleted in HEAD and modified in WebGUI. Version WebGUI
of src/org/myrobotlab/service/WebGUI2.java left in tree.
Automatic merge failed; fix conflicts and then commit the result.
C:\mrl\myrobotlab>
I think I should have committed after the git rm before switching branches. Suggestions?