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

Is git-flow broken in Sourcetree 2.7.1?

Richard Senior
Contributor
February 14, 2018

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
Atlassian Team members are employees working across the company in a wide variety of roles.
February 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. 

Richard Senior
Contributor
February 21, 2018

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.

4 votes
zachgarcia
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 11, 2019

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
Deleted user February 19, 2018

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.

Richard Senior
Contributor
February 19, 2018

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
Atlassian Team members are employees working across the company in a wide variety of roles.
February 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. 

Indexis - Contato
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 22, 2018

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

Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 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. 

Indexis - Contato
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 22, 2018

Going back to 2.7 solved for now.

Aden Narkowicz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 27, 2018

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?

Richard Senior
Contributor
February 28, 2018

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.

1 vote
Stenio Anibal
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 17, 2018

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

1 vote
Andrew Law March 13, 2018

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

1 vote
Frank Lehmann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 19, 2018

I have the same issue after updating to 2.7.1 today.

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

1 vote
Richard Senior
Contributor
February 15, 2018

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.

0 votes
grit_mike
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 13, 2019

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'.

0 votes
lasmit
Contributor
March 15, 2018

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

lasmit
Contributor
March 15, 2018

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

0 votes
victorchat March 13, 2018

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

Andrew Law March 13, 2018

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

victorchat March 13, 2018

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
Atlassian Team members are employees working across the company in a wide variety of roles.
March 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. 

0 votes
yuuki minohara
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 27, 2018

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.

0 votes
dyeazel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 21, 2018

I can't even authenticate after updating to 2.7.1

Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 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!

0 votes
Virl February 21, 2018

Same problem here.

Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 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. 

0 votes
julianmarquesgarcia
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 21, 2018

I have the same issue after updating. 

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

0 votes
Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 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
AUG Leaders

Atlassian Community Events