Using git-flow feature within Sourcetree with standard configuration of git-flow (branch naming conventions ...)
What I did:
What I expected according A successful Git branching model:
=> This does not happen within sourcetree: merge from branch hotfix to branch master does not take place automatically!!
I see the same behaviour with using Release-Branches via git-Flow Button within SourceTree: Starting point of creating branch "Release" is here HEAD of branch develop (that's correct for release branches).
Finishing the release branch only merges to branch develop - merge to branch "master" does not take place ...
What's wrong?
Using: SourceTree 0.9.2.3, Win7 64bit Ultimate ...
The culprit seems to be usage of --no-commit option
Created a issue: https://jira.atlassian.com/browse/SRCTREEWIN-606
Hmm, that's odd because I've run a number of tests here and my hotfix branches always merge to both master and develop. Here's a screenshot of my latest hotfix test:
This happened automatically when finishing the hotfix. There was an issue with using the 'Rebase' option when finishing a feature which caused an issue, this is fixed for 0.9.3 which will be released soon.
Can you try checking the 'Show Full Output' box and see if there's anything in the output that might explain it? All SourceTree does is call git-flow anyway.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's how it looks on my system after finishing hotfix
As you can see, master does NOT contain the hotfix ... The tag "BDBInfo2_BCD" was automatically set by finishing hotfix (I provided Prefix "BDBInfo2" at git-flow setup within Sourcetree)
As I said: the same happens, with finisihing release branches
Output on Hotfix-start:
sh.exe C:\Users\jok\AppData\Local\Atlassian\SourceTree\gitflow_local\gitflow\git-flow hotfix start BCD
Branches 'master' and 'origin/master' have diverged.
And local branch 'master' is ahead of 'origin/master'.
Switched to a new branch 'hotfix/BCD'
Summary of actions:
- A new branch 'hotfix/BCD' was created, based on 'master'
- You are now on branch 'hotfix/BCD'
Follow-up actions:
- Bump the version number now!
- Start committing your hot fixes
- When done, run:
git flow hotfix finish 'BCD'
Output on hotfix finish:
sh.exe C:\Users\jok\AppData\Local\Atlassian\SourceTree\gitflow_local\gitflow\git-flow hotfix finish -f C:\Users\jok\AppData\Local\Temp\cfkz5dc5.s3y BCD
Branches 'master' and 'origin/master' have diverged.
And local branch 'master' is ahead of 'origin/master'.
Branches 'develop' and 'origin/develop' have diverged.
n/develop'.
Your branch is ahead of 'origin/master' by 3 commits.
(use "git push" to publish your local commits)
Switched to branch 'master'
Automatic merge went well; stopped before committing as requested
M .gitignore
Your branch is ahead of 'origin/develop' by 3 commits.
(use "git push" to publish your local commits)
Switched to branch 'develop'
Merge made by the 'recursive' strategy.
.gitignore | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Deleted branch hotfix/BCD (was 0b806d4).
Summary of actions:
- Latest objects have been fetched from 'origin'
- Hotfix branch has been merged into 'master'
- The hotfix was tagged 'BDBInfo2_BCD'
- Hotfix branch has been back-merged into 'develop'
- Hotfix branch 'hotfix/BCD' has been deleted
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Interesting, because the git-flow output says this:
- Hotfix branch has been merged into 'master' - The hotfix was tagged 'BDBInfo2_BCD'<br> - Hotfix branch has been back-merged into 'develop' - Hotfix branch 'hotfix/BCD' has been deleted
So it's certainly claiming that it merged into master. Do you have any settings in your .gitconfig (globally or in this repository) related to merging?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good point - yes I do have:
[branch "master"] mergeoptions = --no-commit --no-ff
That's because I want to give the commits my own comments - and not the automatically generated ones ...
I use --no-ff because it makes the history is easier to understand (in my eyes), and makes it easier to revert a group of commits. (see: http://stackoverflow.com/questions/2850369/why-does-git-use-fast-forward-merging-by-default)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you try removing those options just while testing the finish operation to eliminate that as a potential cause?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After updating Sourcetree 0.9.2.3 -> 0.9.3.0 git_flow does not work anymore. Will be back when I've fixed this issue (see: https://answers.atlassian.com/questions/171852/gitflow-broken-on-v-0-9-3-0)... :-(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.