Is there a way to have Stash/SourceTree automatically configure for GitFlow on clone?

Mark Gillespie December 2, 2013

We are using the GitFLOW workflow, and it seems odd we have to tell our developers to make sure they click the GitFlow button when they clone, so that the repository is initialsed for GitFLow.

Have we set this up wrong, or is this a way to do this? Or is this something that the tool can be improved to do?

1 answer

0 votes
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 27, 2014

Just a few words to make things clearer:

  • gitflow is a concept of git - and not of STASH. STASH has implemented some features to support branching models (where gitflow is one of many branching models). gitflow is just an equal branching model within STASH.
  • STASH is lacking the possibilty to set default values for new repositories (see https://answers.atlassian.com/questions/9876932)
  • => STASH has NO option to automatically initialize gitflow
  • SourceTree has NO option to automatically initialize gitflow
  • As gitflow settings are stored within your .git/config file, you can provide a script to autimatically initialize gitflow for your newly cloned repository - but this is just another workaround (what's the difference of running this script from initializing gitflow from SourceTree? smile) (see for example http://stackoverflow.com/questions/23723461/how-can-i-share-a-git-configuration)

So the answer to your question is:

No, there is no way to have STASH/SourceTree automatically configure for GitFlow on clone.... (that's my current state of knowledge)

Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 27, 2014

One thing which might work (untested): Try to use systemwide/userwide .config file to init gitflow on each clone. Unless you have to provide this config file on each developers machine, it might help to avoid pressing "Init gitflow" within Sourcetree on each clone. (see for example: http://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events