Practical Web Programming

Thursday, March 21, 2013

Git: How to Create a New Branch and Merge it's Changes to Develop Branch

$ git checkout -b new_branch develop

This command will create a branch called new_branch off of develop branch and will switch to it automatically. So now you are in the new_branch branch and can make your changes. When finished, commit the changes and switch to develop branch.

$ git checkout develop

You can now merge by running:

$ git merge new_branch

This command will merge the changes in new_branch to the develop branch.

0 comments:

Recent Post