Custom Search

Monday, April 28, 2014

Git How to merge a branch into master branch (Move all new commits one by one from our branch to master branch)

1)
#git clone https://github.com/myrepo/horizon.git

2)
#cd horizon
*Now you are in master branch

3)
*Checkput new feature branch
#git checkout new_feature

4)
*Go back to master branch
#git checkout master

5)
*Check log
#git log -n 3

6)
*Merge the branch "new_feature" into "master"
#git merge new_feature

7)
*Check log
#git log -n 3
8)
#Push master to remote repo (https://github.com/blabla)
#git push remote master

2 comments:

  1. http://git-scm.com/book/en/Git-Branching-Basic-Branching-and-Merging

    ReplyDelete
  2. http://fosshelp.blogspot.in/2014/01/git-how-to-keep-all-our-commits-on-top.html

    ReplyDelete