How can I share git configuration?

I initiated a new git repository using git flow, committed a commit or two and clicked.

When I clone the repository in a new directory and run the command git flow, I get an error:

Fatal: Not a gitflow-enabled repo yet. Please run 'git flow init' first.

The cause of the error is that the file .git/configin the newly cloned directory does not contain the git stream configuration.

How can I push / share the configuration so that any clone of the repository has the correct configuration?

+4
source share
2 answers

You cannot share configuration directly

The contents of the folder .git(intended) for a specific installation.

Alternative

, , script , . bin/setup :

#!/usr/bin/env bash

# simple
git flow init -d

# override stuff or whatever
git config gitflow.prefix.versiontag ""
git config gitflow.prefix.feature ""

:

-> chmod +x bin/setup
-> git add bin/setup
-> git commit -m "adding a setup script to ensure consistent config"

:

-> git clone ....
-> cd project
-> bin/setup
-> git config -l --local
...
gitflow.branch.master=master
gitflow.branch.develop=development
gitflow.prefix.versiontag=
gitflow.prefix.feature=
gitflow.prefix.release=release/
gitflow.prefix.hotfix=hotfix/
gitflow.prefix.support=support/
+6

, , , git flow init , Git :

git flow init

, Git pull , , , :

git pull origin develop

, , , , , . Git

, , : Git clone , Git git flow init.
( Git )

0

Source: https://habr.com/ru/post/1541029/


All Articles