1

I have a branch called hotfix (branched from the master branch) for which I opened a pull request on Github. The request page said that the hotfix branch is not up to date and provided me an option to Update Branch. On clicking this option, it says Merging branch 'master' into hotfix.

So I just wanted to ask that the master branch will remain as is, right? The wording above is a little ambiguous to me. If not, what is the right way to do it on the Github UI?

3 Answers 3

1

The language "merging X into Y" means that any new commits which are present on X, but aren't on Y will be added after all the commits currently on Y. Or, if you currently have:

master:    A - B - C - D - E
               \
hotfix:          X - Y - Z

After merging master into hotfix, you'll have:

master:    A - B - C - D - E
               \           \
hotfix:          X - Y - Z - C - D - E
1
  • Perfect, this is the confirmation what I was looking for!
    – rgamber
    Commented Jul 12, 2016 at 22:37
1

Yes that is equivalent to the following set of commands, if you were trying to do this locally:

git checkout hotfix  // hotfix is behind master by some number of commits       
git merge master

Which just synchronizes your hotfix branch, but leaves the master branch intact. It will grab the changes from master, which aren't in your branch, into your branch:

https://help.github.com/articles/syncing-a-fork/

1

Yes, the master branch will remain as is. It is just your branch "hotfix" which is again updated with the latest master branch code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.