Which is a recommended method when bringing aosp ics branch into master(my project main branch), git merge or git rebase? (By the way I read When do you use git rebase instead of git merge?, but still confused which is the proper thing to do in that situation.)
2 Answers
bringing aosp ics branch into master?
merge (first merge master
into your aosp ics
branch in order to solve any conflict locally, then merge aosp ics
to master
)
A rebase
is only interesting in your case if you didn't push your aosp ics
, ie if you didn't publish the history of that branch to a public upstream repo.
Then you could rebase aosp ics
on top of master
, again resolving any conflict locally, before merging aosp ics
to master
.
So even with rebase, you would end up with a merge from aosp ics
to master
.

- 1,262,500
- 529
- 4,410
- 5,250
The quick steps to rebase the 'aosp_ics' branch onto master would be:
git checkout aosp_ics
git rebase master
git checkout master
git rebase aosp_ics
--or-- git merge -ff-only aosp_ics
**this assumes there are no uncommitted changes and no merge conflicts during the rebase. If there are merge conflicts just insert the steps for resolving conflicts during a rebase, and then resume the steps above.*gs

- 1,928
- 1
- 33
- 38