I have created a local git repository in C:\temp\ConsoleApplication1
. Then I click the Git Flow
button and follow by OK to accept all default settings. Now under the branches, I can see develop and master.
Next I click Git Flow again to start a new feature, then make some changes and finally finish the feature.
Now my branch looks as follows:
[develop] add line 1
[master] initial commit
Question: I would like to merge the develop into the master branch. What is the right method to achieve that?
I have tried to select develop
branch, then click Merge
button. No matter which commit I choose, there is nothing happens. I also tried to select master and see no difference.
master
Not entirely clear in the question, but did you try this already? The key step is making sure you currently have master
checked out.
Sourcetree has changed a fair bit since this question was asked, but just in case others arrive here and don't quite understand the new "Merge" button, all you need to do is checkout the branch you want to merge your changes into , eg "master" (double click on the branch on the left in Sourcetree under "Branches).
Next, just right-click on the branch you want to merge into your current branch (eg "my-new-branch") and from the right-click menu, select " Merge my-new-branch into master ". This helped me coming to Sourcetree as a GitKraken user.
As you said you are using git flow, the right way to merge develop into master is to start a new release branch.
After you have run tests on the release branch by finishing release it would merge on both develop and master to bring all the latest changes to the branches. Also they have a guide smarter branching with sourcetree on their blog.
I think you need to create a local "master" branch tracking your remote origin/master.
In Git command line:
git push -u origin master
You must firstly commit
and push
you changes in local development in origin/development.
You merge
your changes from local development into local master
(create above)
From there commit
and push
into you remote master branch
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.