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

What does "Initialising repository for git-flow" is SourceTree do?

When I press "Git Flow" button for the first time SourceTree is asking me to initialise repository for git-flow.

I am trying to understand two things:

  1. Why uncommited changes are preventing SourceTree from initialising repo for Git Flow?
  2. Why other users have to initialise repository for Git Flow again when they clone it?

So what is exactly happening when I initialising repository for git-flow?

1 answer

Gitflow is a local utility that provides shortcuts for common operations associated with one common git workflow (named "git-flow").

Before you can use gitflow, you need to "initialize" it, which basically requires you to configure the plugin. As far as I remember, the only thing you need to specify is what you want to use as the prefix for each of the types of branches gitflow supports.

Many gitflow operations involve switching branches, and git won't typically let you switch branches if you have uncommitted changes (there are some exceptions), so that is probably why gitflow won't let you init while you have uncommitted changes.

My point is if initialising SourceTree's GitFlow has nothing to do with repository it should not care about the state of my working copy.

I was wondering if it does something else other than setting up branch prefixes.

For that you'd have to ask the developer of gitflow, which isn't SourceTree/Atlassian. http://nvie.com/posts/a-successful-git-branching-model/ https://github.com/nvie/gitflow

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 Jan 17, 2019 in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,394 views 13 14
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you