sublime_merge icon indicating copy to clipboard operation
sublime_merge copied to clipboard

install git-flow

Open masciugo opened this issue 6 years ago • 8 comments
trafficstars

Version info

  • macOS 10.13.6
  • Build: 17G65

Description

I've installed git flow with homebrew but..

Screen Shot 2019-03-15 at 12 04 52

cannot see anything about git-flow in the preferences menu

masciugo avatar Mar 15 '19 11:03 masciugo

Does running git flow from the command line work?

Could you also provide the version of Sublime Merge which you are running, thanks.

BenjaminSchaaf avatar Mar 18 '19 01:03 BenjaminSchaaf

yes it works from the command line

Screen Shot 2019-03-27 at 18 15 40

masciugo avatar Mar 27 '19 17:03 masciugo

Try switching the Git Binary (via Preferences/Advanced) between system and bundled

jskinner avatar Mar 28 '19 00:03 jskinner

Same problem for me. Also running Sublime Merge build 1107.

Screenshot 2019-03-28 at 12 57 52

Git is installed via brew install git Git flow is installed via brew install git-flow (I also tried git-flow-avh) git and git-flow are symlinks in /usr/local/bin pointing to the homebrew cellar.

PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

Git flow works fine from command line:

$ which git
/usr/local/bin/git
$ which git-flow
/usr/local/bin/git-flow
$ git flow
usage: git flow <subcommand>

Available subcommands are:
   init      Initialize a new git repo with support for the branching model.
   feature   Manage your feature branches.
   release   Manage your release branches.
   hotfix    Manage your hotfix branches.
   support   Manage your support branches.
   version   Shows version information.

Try 'git flow <subcommand> help' for details.

Git flow works fine in Sublime Merge if using the bundled git, but would prefer managing git myself.

Tenzian avatar Mar 28 '19 13:03 Tenzian

@jskinner that works thanks. I think it should work with the system version too

masciugo avatar Mar 28 '19 13:03 masciugo

Still a problem with system git, or explicitly stating path to git in preferences. git flow works fine on command line.

=== App Version Information === Build: 1116

=== Git Version Information === Using Git: git (system) git version 2.14.3 (Apple Git-98) PATH: /usr/bin:/bin:/usr/sbin:/sbin no output from shell "/bin/bash" in 1000ms

$ which git /usr/local/bin/git

It may be that the PATH reported by sublime-merge does not include the actual path where git-merge is /usr/local/bin/git

How do we add to sublime-merge's PATH?

ian-nisbet avatar Jul 06 '19 11:07 ian-nisbet

I experienced this issue when switching between the "System" git and MacPorts git & git-flow (/opt/local/bin/git) on macOS 10.15. Sublime Merge Build 1119. The same error message was presented, and I confirmed that the path was set in the settings file for Sublime Merge and that git-flow worked from the command-line. When I quit Sublime Merge and started it fresh, git-flow commands worked properly.

jwillikers avatar Nov 05 '19 19:11 jwillikers

A possible solution to this issue may be to run smerge from a console where git-flow is setup and available, making Sublime Merge inherit the correct enviroment variables.

The environment variables may not be picked up due to using zsh, and thus using .zprofile instead of .profile.


In my system git-flow is installed with brew and located at:

> which git-flow
/opt/homebrew/bin/git-flow

Git is the system installed one, and Sublime Merge does not set a custom git path so it should point to system too:

> which git
/usr/bin/git

When running Sublime Merge the usual way (clicking on the MacOS Dock or through Finder at the Applications folder) the PATH does is not including the aforementioned git-flow path.

This is part of the Sublime Merge console output when attempting a git flow release, elipsis ([...]) are replacing not pertinent output:

Executing: git flow release start 1.2.1, 
Working dir: [...]
  Env vars: [...] PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Library/Apple/usr/bin [...]
Result: failed with exit code 1

When running sublime merge (> smerge) on a console where git-flow is setup and working seems that the PATH is inherited. In that case running a git flow release outputs in the Sublime Merge console:

Executing: git flow release start 1.2.0
Working dir: [...]
  Env vars: [...] PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/munki:/Library/Apple/usr/bin:/opt/homebrew/bin:/opt/homebrew/sbin:[...] [...]
Result: success

And git-flow commands are working!


This was run/using:

  • MacOs 12.4 (21F79)
  • Sublime Merge Build 2077
  • iTerm Build 3.4.16
  • zsh --version: zsh 5.8.1 (x86_64-apple-darwin21.0)
  • git --version: 2.32.0 (Apple Git-132)
  • brew --version: Homebrew 3.6.0-24-g5524b30
  • brew info git-flow: git-flow: stable 0.4.1 (bottled), HEAD

lopsae avatar Sep 08 '22 19:09 lopsae