It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Mark Gillespie Dec 02, 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 Oct 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 Oct 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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

What podcasts are you listening to right now?

Like the title says: what podcasts are in your rotation right now? Here are some favorites I've been in to from the last few weeks. The Ringer NBA Show I've been diving deep into the NBA Playoffs...

840 views 16 9
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you