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?
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.