Search This Blog

Tuesday, April 23, 2013

How to merge changes from a custom branch into master branch on github

As per our release policy for the api-challenge we have created a new branch called challenge5 to release the code that implements task #5. After the initial release we found some bugs. We fixed them and committed the changes back to our challenge5 repository using this method How to modify files in your branch on github. These are the changes made to the challenge5 branch:


The changes made on the challenge5 branch are not visible in master repository. How to copy the changes from challenge5 to master branch.


To copy the changes from one branch to another you can use github merging feature.
PS > git status .\
# On branch master
nothing to commit (working directory clean)

PS > git branch
* master

PS> git merge challenge5
Updating d609784..7872d14
Fast-forward |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

PS > git status .\
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
nothing to commit (working directory clean)

PS > git push
Total 0 (delta 0), reused 0 (delta 0)
   d609784..7872d14  master -> master



No comments:

Post a Comment