How to combine branch development into a master branch in SourceTree?

I created a local git repository in C:\temp\ConsoleApplication1 . Then I click the Git Flow button and click OK to accept all the default settings. Now under the branches I see development and development.

Then I press Git Flow again to start a new function, then make some changes and finally complete the function.

Now my branch looks like this:

 [develop] add line 1 [master] initial commit 

Question: I would like to combine development in the main branch. How to do it right?

http://i64.tinypic.com/259ye6b.png

I tried to select the develop branch, and then click the Merge button. No matter which commit I choose, nothing happens. I also tried to choose a master and I see no difference.

+17
git atlassian-sourcetree
source share
4 answers
  1. Checkout master
  2. Click the Merge button, and the Merge dialog box opens.
  3. Select the commit with the message "add line 1" and click "OK"

Not entirely clear in the question, but have you tried this already? The key step is to make sure your master is currently verified.

+18
source share

It seems to me that you need to create a local branch "master" that tracks your remote start / master.

At the git command line:

  git push -u origin master 
  • You must first commit and push change the local development at the start / development.

  • You merge your changes from local development to local master (create above)

  • From there commit and push to your remote master branch

0
source share

Sourcetree has changed a bit since this question was asked, but just in case others come here and don’t quite understand the new Merge button, all you have to do is check the branch you want to merge your changes into for example, "master" (double-click the branch on the left in Sourcetree in the "Branches" section).

Then just right-click on the branch you want to merge with the current branch (for example, "my-new-branch"), and select "Merge my-new-branch to master" from the context menu. This helped me switch to Sourcetree as a GitKraken user.

enter image description here

0
source share
  • In SourceTree, switch your working copy to local / branch
  • Merge changes from remote / master using command line SourceTree or git
  • Resolving conflicts using Sourcetree or an external text editor (save the changes you want to save, delete the remote conflict)
  • Commit and push changes to remote / branch
  • In the GitHub web interface, go to the appropriate branch, then create a new pull request (if all conflicts are not resolved, you will not be able to create a transfer request).
  • Administrators will be notified of the pull request, and changes will be accepted or changes will be requested. If there is no admin setting, the upload request is automatically combined.
-one
source share

All Articles