Custom Search

Wednesday, November 27, 2013

Git How to sync your branch with master and apply latest changes (last commit) on top of that

1)
Suppose, right now your are in branch the 'mybranch'

a)
Git commit all changes

2)
Goto master

#git checkout master

3)
Update Master

#git pull



4)
Go back to the branch 'mybranch'

#git checkout mybranch

5)
Sync the branch 'mybranch' with master and apply our changes (last commit) on top of that

#git rebase -i master

6)
We should do above steps after each commit

No comments:

Post a Comment