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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,461,688
Community Members
 
Community Events
176
Community Groups

Is git-flow broken in Sourcetree 2.7.1?

Edited

I have 2.7.1 (156) with embedded git-flow, running on latest Mac OS.

The normal git-flow process when finishing a release is:

  1. Merge release branch into master
  2. Tag master with the release version
  3. Merge release branch into develop
  4. Delete release branch

It looks to me like git-flow is only doing steps 1 & 2. No error dialogs.

To reproduce: make a test project initialized with git-flow, add a couple of commits on develop, start a new release, make a commit in the release branch and try and finish the release. I end up sat on master, release branch still there and develop missing the commit from the release branch.

I've used git-flow a lot and never had this problem. Can anyone confirm the same issue?

 

EDIT (15-Feb-2018): I installed git-flow using Homebrew and tried the same test from the command line with git-flow. It works fine. So I switched Sourcetree to system git-flow and tried again. I get "

flags:WARN getopt: illegal option -- f

 -- /var/folders/h8/n_m5b8zs26bdcng40f1p2xp80000gn/T/SourceTreeTemp.1BO8Ra 1.3

flags:FATAL unable to parse provided options with getopt."

I'll raise a ticket.

 

15 answers

1 accepted

6 votes
Answer accepted
Manju Atlassian Team Feb 21, 2018

You need getopt to make this work. You can follow the Post Installation setup from Installing-on-Mac-OS-X to get this working. We are trying to get this fixed for the next release. 

Thanks Manjunath. I uninstalled git-flow using Homebrew and replaced it with git-flow-avh. With Sourcetree set to use system git-flow, release branches work correctly again. I didn't have to install gnu-getopt, Homebrew pulled gnu-getopt in as a dependency.

With embedded git-flow, release branches didn't work initially. I had to follow this step in the post-installation instructions for git-flow-avh:

Create a ~/.gitflow_export with the content export FLAGS_GETOPT_CMD="$(brew --prefix gnu-getopt)/bin/getopt".

Note that I had to change 'brew' to '/usr/local/bin/brew'.

With that config, Sourcetree 2.7.1 (159) is able to finish release branches again using embedded git-flow. I suspect I could have just installed gnu-getopt with Homebrew and done the config as above but I've decided I like having the command line version of git-flow around.

is there any update on this? i'm using version 3.1.2. I seem to be able to create it from the latest development branch just fine however when choosing a specific commit / working revision it does not which it did previously.

2 votes

I'm getting an error trying to finish a hotfix branch using gitflow since updating to 2.7.1 as well.

flags:ERROR short flag required for (showcommands) on this platform

flags:ERROR short flag required for (keepremote) on this platform

flags:ERROR short flag required for (keeplocal) on this platform

flags:ERROR short flag required for (squash-info) on this platform

/Applications/SourceTree.app/Contents/Resources/git_local/gitflow/gitflow-common: line 81: [: -eq: unary operator expected

/Applications/SourceTree.app/Contents/Resources/git_local/gitflow/gitflow-common: line 81: [: -eq: unary operator expected

It doesn't look like any action is applied.

I'm going to see if I can downgrade to the previous version of SourceTree.

 

EDIT: After downgrading to 2.6.3 I no longer get any errors.

I've done some more testing with members of a team I'm working with. Some had the problem and others not. Our best guess is that the issue with finishing release branches is a regression in 2.7.1.

We found 2.6.x versions to be OK. The latest 2.7 version that seemed to work was 2.7 (152).

Of course, this doesn't explain why Manjunath is OK with 2.7.1 and I am not.

Manju Atlassian Team Feb 19, 2018

I can get some more folks try this internally and see where the issue is. FWIW, versions 2.7 and above have git-flow avh integrated. 

Me and a coworker have the same problem, when closing features or relases

Manju Atlassian Team Feb 22, 2018

You need getopt to make this work. You can follow the Post Installation setup from Installing-on-Mac-OS-X to get this working. We are trying to get this fixed for the next release. 

Going back to 2.7 solved for now.

Hi @Manju

I'm running SourceTree v2.7.1 (159) on Sierra 10.12.6 (16G1114) and am seeing this problem.

I have the latest `git-flow-avh` installed via brew and switching from the embedded `git-flow` to that binary fixes the problem.

I presume you're not suggesting that we need to manually install `getopt` to use the embedded `git-flow` bundled with SourceTree?

If you installed git-flow-avh via Homebrew, it should have installed gnu-getopt. You can confirm that by running `brew list` in Terminal.

To make embedded git-flow work, you will need a `.gitflow_export` file in your home directory with this line in it:

FLAGS_GETOPT_CMD="$(/usr/local/bin/brew --prefix gnu-getopt)/bin/getopt"

I'm assuming all of this is just a workaround and that we won't need gnu-getopt once the issue is fixed, but Manjunath is better placed to comment on that.

This works beautiful for me but, prevision to next release fixing this bug?

Version 2.7.1 (159) on OSX 10.13.3 still has the problem. I just had to downgrade from Time Machine backup.

I have the same issue after updating to 2.7.1 today.

Finishing features and releases won't merge and delete the branch correctly :/

Thanks for your reply. I've updated to 2.7.1 (157) and tried again but I still have the same problem. I've tried it on another Mac and it's the same there too.

I've tried various combinations of embedded and system git and git-flow. If I use system git-flow and don't tag the commit to master, it works as expected, but that's not really a solution.

I had to install Sourcetree 2.7.4 on an older Mac running Sierra and ran in to this issue. I fixed it by renaming 'Sourcetree 2.app' to 'Sourcetree.app'.

I am also unable to close feature in gitflow. Happy to provide more info if it helps debug the issue.

In trying to move this forward I tried a free trial of Tower.

Tower showed I had a file in a repo which needed committing. I committed it in Tower and then did the gitflow in SourceTree and it worked.

Interestingly, after fixing the issue, in SourceTree commit history I see the commit and the file that it said should be updated. In Tower I see the commit, but it says nothing changed in that commit.

Again, happy to provide more info if I can

I followed  Manjunath's advice and it seems to be working fine now

But now you've had to install something else in order to get SourceTree to work. That's not sane in the long term

I already had git-flow-avh installed in order to work with git-flow using the command line so it was not a big change for me.

Manju Atlassian Team Mar 14, 2018

We understand the frustration of not being able to get things done out of the box. Its on our priority list to get it fixed soon. Thanks for your patience and understanding in the meanwhile. 

I had the same issue after updating, I solved this issue by downloading old version, here.

https://www.sourcetreeapp.com/download-archives

 

I hope solving this issue by next version.

I can't even authenticate after updating to 2.7.1

Manju Atlassian Team Feb 21, 2018

Please describe your issue in detail to avail help. It would be very kind of you to move this to a new thread since this is specific to git-flow issues.

Thanks!

Same problem here.

Manju Atlassian Team Feb 21, 2018

You need getopt to make this work. You can follow the Post Installation setup from Installing-on-Mac-OS-X to get this working. We are trying to get this fixed for the next release. 

I have the same issue after updating. 

I have changed the preferences to use system gitflow and it works

0 votes
Manju Atlassian Team Feb 15, 2018

Hi @Richard Senior

I'm on the latest version of Sourcetree v2.7.1(157) and I don't see this issue. My release branch was merged both to master and develop and deleted after that. I've attached below screenshot that just shows the same. gitflow_demo.png

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events