gitflow icon indicating copy to clipboard operation
gitflow copied to clipboard

Persisting git flow init settings

Open julian7 opened this issue 14 years ago • 7 comments

I think setting up git flow for multiple developers can be very tedious and error-prone (if we don't use default settings). Therefore it would be great to have a file in top level directory (let's call it .gitflow for now), which stores all the answers a git flow init might require.

Then, when a new developer joins, he/she would be able to run 'git flow init' with no arguments, and no questions whatsoever.

Besides, you can achieve the same functionality with the following two commands:

Saving data: git config --get-regexp '^gitflow' | sed "s/ /' '/" | while read A; do echo "git config --local '$A'"; done > git rev-parse --show-toplevel/.gitflow

Instead of git flow init: . ./.gitflow

julian7 avatar Jan 31 '11 16:01 julian7

I'd like to find a solution for this problem. There has already been some discussion on the topic, I may say. To read up on it, please see http://groups.google.com/group/gitflow-users/browse_thread/thread/9920a7df3d1c4908

nvie avatar Feb 03 '11 16:02 nvie

You can have alteast half of the questions answered for you by having a file called .gitconfig in your home directory, and including this:

[gitflow "prefix"]
  feature = feature/
  release = release/
  hotfix = hotfix/
  support = support/
  versiontag = v

Of course, change yours where appropriate. Unfortunately the scripts will still ask for "master" and "develop" branches.

keithamus avatar Feb 21 '11 15:02 keithamus

I think the idea I brought up works better, because it creates a file which can be put into version control. Therefore all the settings can be reproduced on setting up a new development environment.

So far I'm fine with this solution, nevertheless it would be great to have it documented somewhere :)

julian7 avatar Feb 24 '11 11:02 julian7

Second for pushing to version control. Looking to use git flow on multiple projects with multiple conventions, so ~/.gitconfig doesn't work for how I use it.

clarkbreyman-yammer avatar Jul 07 '11 18:07 clarkbreyman-yammer

.gitflow configuration file could be put in a "central" bare repository (by default origin)

boryn avatar Jul 31 '11 23:07 boryn

Here's a pull request that could address this issue: nvie/gitflow#147

I'd be happy to get some feedback on this.

sometimesfood avatar Aug 23 '11 12:08 sometimesfood

Is there a config file?

AlphaJuliettOmega avatar Oct 09 '17 09:10 AlphaJuliettOmega