如何更改SourceTree中的git-flow配置?

问题描述 投票:0回答:4

在我的团队中,我们正在从 svn 迁移到 git,并且我们已经同意采用 git-flow 流程。我已经使用 SourceTree 和 Git-Flow 扩展有一段时间了。现在,我们决定将开发分支称为development/current,但我在 SourceTree UI 中找不到更改 Git-Flow 配置的位置。

初始化后是否可以更改给定存储库的 Git-Flow 配置?

git git-flow atlassian-sourcetree
4个回答
121
投票

不,这是不可能的(至少在 SourceTree 1.4.1.0 上不可能)。

但是,可以通过编辑 git 存储库中的文件

/.git/config
来手动完成此操作。

Git-Flow 扩展在以下两个部分添加了配置,可以自由编辑。

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

资源:http://www.crisi.ch/change-git-flow-settings-in-sourcetree/


52
投票

在 SourceTree 2.x 中,编辑 GitFlow 很容易。

  1. 如果您使用的是 Mac,请单击“设置”(Windows 中的存储库 - 存储库设置)
  2. 选择高级选项卡
  3. 单击编辑配置文件...


12
投票

你必须使用

git flow init -f


0
投票

您可以使用

git flow config set <option> <value>
设置任何配置。 例如,如果你想设置功能前缀,你可以使用:
git flow config set feature ft_. 

© www.soinside.com 2019 - 2024. All rights reserved.