是否有撤消git flow init的命令?


84

之后git flow init,如何删除git flow模型?
甚至,我从.git/config文件中删除了相关的配置。

$ git flow init
# force reset
$ git flow init -f

已经从.git / config文件中删除以下内容。

[gitflow "branch"]
    master = master
    develop = develop
[gitflow "prefix"]
    feature = feature/
    release = release/
    hotfix = hotfix/
    support = support/
    versiontag = 

谢谢。



3
@codebreaker,感谢您的答复。这个线程#3212459是关于git int而不是git flow init...
— payliu

Answers:


98

您也可以从命令行执行@Peter所说的!

这些命令删除与gitflow相关的git config文件的所有部分。

git config --remove-section "gitflow.path"
git config --remove-section "gitflow.prefix"
git config --remove-section "gitflow.branch"

然后,您可以照常重新初始化gitflow。

git flow init

1
生命的救星。非常感谢您
— -CIRCLE

通过Eclipse Init Gitflow不存在“ gitflow.path”。
— softwarevamp

git config --remove-section“ gitflow.path” && git config --remove-section“ gitflow.prefix” && git config --remove-section“ gitflow.branch”
— Code Spirit

我想
— 投票,

啊@ miva2,很高兴我曾经两次有用。
— danidemi

36

如果您从配置中删除了这些部分,那么对git-flow的任何引用都将消失。

尽管实际上并不需要删除任何内容,但是git-flow模型就是这样,它是一个模型。您始终可以使用标准的git命令。

git-flow会添加到您的配置中,只有git-flow软件会使用,而不是git本身。


2
我认为@payliu遇到的问题是,当您运行git flow init设置的值时,无法通过git flow init再次运行来重置。git flow工具对您的仓库进行了假设,而这些假设在您运行时可能并不正确git flow init。请参阅开发人员在此处遇到
— ThomasW 2015年
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.