简体   繁体   English

如何在 SourceTree 中重置 git-flow 配置?

[英]How to reset the git-flow configuration in SourceTree?

In my team we are migrating from svn to git and we have agreed upon embracing the git-flow flow.在我的团队中,我们正在从 svn 迁移到 git,并且我们已经同意采用 git-flow 流程。 I've been playing around a while with SourceTree and the Git-Flow extension.我一直在玩 SourceTree 和 Git-Flow 扩展。 Now, we have decided that the develop branch will be called development/current instead, but I do not find in the SourceTree UI where to change the Git-Flow configuration.现在,我们决定将 develop 分支称为 development/current ,但我在 SourceTree UI 中没有找到更改 Git-Flow 配置的位置。

Is it possible, once initialized, to change the Git-Flow configuration for a given repository?一旦初始化,是否可以更改给定存储库的 Git-Flow 配置?

No, it is not possible (at least not at SourceTree 1.4.1.0).不,这是不可能的(至少在 SourceTree 1.4.1.0 中不可能)。

It is possible however to do it manually by editing the file /.git/config in your git repository.但是,可以通过编辑 git 存储库中的文件/.git/config手动执行此操作。

The Git-Flow extension adds it s configuration in the following two sections, which can be freely edited. Git-Flow 扩展在以下两部分添加了它的配置,可以自由编辑。

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

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

In SourceTree 2.x it is easy to edit your GitFlow.在 SourceTree 2.x 中,编辑 GitFlow 很容易。

  1. Click Settings if you're using Mac (Repository - Repository Settings in Windows)如果您使用的是 Mac,请单击设置(存储库 - Windows 中的存储库设置)
  2. Select Advanced Tab选择高级选项卡
  3. Click Edit Config File ...单击编辑配置文件...

截屏

你必须使用git flow init -f

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM