I am having problem with Git rebase that I have to merge the code again and again but still unsuccessful.
I had cut of my branch (A) from master. I started working on my branch and made more commits. At the same time, master was also changed and underwent bunch of commits. Now I am trying to merge my branch back to master.
So I give,
git co master
git pull
git co branch-A
git rebase master
Now I get messages like CONFLICT : Merge conflict in
With this, it branches into a new branch with name (no branch, rebasing branch-A) After this I resolve all the conflicts and then I give git add of all those files.
Now I get the status
rebase in progress; onto ad0da3f
You are currently rebasing branch 'branch-A' on 'ad0da3f'.
(all conflicts fixed: run "git rebase --continue")
After this I run git rebase --continue and all the changes which I did to resolve the conflicts are gone and it goes back to the initial state of merging and throwing a huge bunch of Conflicts as before!
My question is,
- How can I get back all the conflict resolutions that I have done before issuing git rebase --continue?
- How can I not get stuck into the same loop requiring to merge again and again to pull the changes from master to my branch?
After I successfully merge all the changes from master to my branch, to merge my branch back to master, can I simply use,
git co master git merge branch-A
Or do I need to issue any more commands?
Any help please...