Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git rebase problems

Tags:

git

I have been developing a branch happily and each day rebasing each day from the master with:

git rebase master

Today when I did a rebase master, I get the following message:

Falling back to patching base and 3-way merge...

The rebase took me through a very lengthy process of merging the same set of files over and over again. It stated "Patch failed at 001" and continued up until 044.

After I had finished the rebase and pushed the branch to the remote, I entered the rebase command again WITHOUT doing any modifications to the code:

git rebase master

It then took me through the exact same rebase again. I am totally lost as to what is going on. I just want to apply bug fixes from the master to this branch without going through this process each time.

Can anyone help me out with what is going on. I don't want to have to go through this each time I rebase from the master.

like image 558
dagda1 Avatar asked May 27 '11 13:05

dagda1


1 Answers

Using git rebase to continually rebase onto another branch goes to the way Git is generally expected to work. What you should probably be doing is merging master into your own development branch every so often. This will keep your development branch up to date with changes from master and will keep your own development commits out of the master branch.

If you don't want to have a bunch of merges in from master in your development branch, use git rerere's functionality and do:

git merge master
git reset HEAD~

With git rerere enabled, it will record your merge resolutions if there are any conflicts so that you won't have huge conflicts later.

like image 51
Marcus Griep Avatar answered Nov 12 '22 14:11

Marcus Griep