Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Merge questions

Delette Collins July 29, 2014

New Git users here. We have been going about things incorrectly and I am trying to clean things up. We have a temp branch and a master branch. Changes have been made and pushed on both branches. Ultimately I would like to get everything from the temp branch over onto the master branch and then I remove the temp branch so I can implement GitFlow. In source tree what branch should be checked out when I click merge and how can I ensure that I am merging the temp branch to master and not vice versa?

1 answer

1 accepted

0 votes
Answer accepted
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2014

In source tree what branch should be checked out when I click merge and how can I ensure that I am merging the temp branch to master and not vice versa?

You always need to be on the branch where you want to merge your changes into - in your case: "merging the temp branch to master" means; checkout master and merge the changes from branch temp. That's not a question of the git-client (i.e SourceTree) but a general question on git.


Ultimately I would like to get everything from the temp branch over onto the master branch and then I remove the temp branch so I can implement GitFlow

Change the current branch to master in git on Stackoverflow seems to give the answer here.

Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 29, 2014

You always need to be on the branch where you want to merge your changes into

Consider yourself being the branch to be merged into: do you want to fetch the changes on your own - or do you want to be forced by another branch to involve it's changes? I think you prefer deciding on your own, which changes should be incorporated rather than being forced to involve the changes...

Therefore: While merging, you have to be on the branch where you want to merge the changes from another branch into.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events