How can I recover if I made a mistake in git flow init?

iwein picture iwein · May 16, 2015 · Viewed 7.8k times · Source

I've run git init and made a mistake selecting the first branch. Now I want to rerun it to change the settings, but it never asks the first question again.

Which branch should be used for bringing forth production releases? 
   - develop

Branch name for production releases: [] develop

Which branch should be used for integration of the "next release"?

Branch name for "next release" development: [develop] ^C
Lymnaea:boxes (develop) $ git flow init

Which branch should be used for integration of the "next release"?

Branch name for "next release" development: [develop]
Production and integration branches should differ.

How can I undo the first init run so that I can set the branch to master?

Answer

iwein picture iwein · May 16, 2015

In the end I found the answer in this question. It's not entirely a duplicate, so I'll leave this here for the next person that cannot find the right keywords.

git flow init -f # will force re-initialization

If you want to do it manually, you can use git config -e.