I got it working by doing the steps mentioned by jpfl @ answers.atlassian.com:
Although this is an old post, just wanted to add to this since I’ve
gotten stuck on this same error. Was able to resolve by doing the
following:
- Open the .git\config file OR Repository -> Repository Settings -> Remotes -> Edit Config File (Sourcetree 2.7.6)
- Remove all the [gitflow * entries and save
the file- Close and re-open SourceTree
- In the main menu, go to
Repository > Git Flow > Initialise Repository (should be enabled
now)