git-flow on more than one master
git-flow on more that one master
我在 SouceTree 上使用 git-flow 来管理我的项目;
到目前为止一切正常,但现在我想重新定义与后端的接口(总而言之,我将把对服务器的 ajax 调用替换为对新 oData 对象的函数调用...)
好的,我的愿望是有两个分支:
- “遗留”掌握和开发分支,我可以从中继续使用所有 ajax 接口扩展我的项目
- “新”掌握和开发分支,我可以从中进行大量操作以连接新的 oData 对象和其他后续更改。
第一个(不好的)解决方案是从“遗留”开发中创建一个“新”发布分支。
你还有其他解决办法吗?
p.s.
fork 冷是解决方案,但我不能 fork 我的存储库。我没有 GitHub 帐户,我在网络磁盘上有一个远程裸存储库。
我试图将 old_repo 克隆到 fork_repo,但是当我尝试将本地更改推送到远程 fork_repo 时,我收到此消息:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
Pushing to G:\Sorgenti\SorgentiGIT\intra_fork
remote: error: refusing to update checked out branch: refs/heads/master[K
remote: error: By default, updating the current branch in a non-bare repository[K
remote: error: is denied, because it will make the index and work tree inconsistent[K
remote: error: with what you pushed, and will require 'git reset --hard' to match[K
remote: error: the work tree to HEAD.[K
remote: error: [K
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to[K
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into[K
remote: error: its current branch; however, this is not recommended unless you[K
remote: error: arranged to update its work tree to match what you pushed in some[K
remote: error: other way.[K
remote: error: [K
remote: error: To squelch this message and still keep the default behaviour, set[K
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.[K
我觉得你不太理解 master 分支的含义。
主分支反映了项目的稳定(运行 生产,或 准备好 投入生产)版本。 Develop 是您的主要开发分支,一旦您的功能完成,您所有的功能分支都会合并到这里。
准备好发布产品的新版本后,将开发合并到 master 中。
你要做的是维护两个 master 和两个 develop 分支。那是胡说八道。您不能 为一个 项目设置两个主分支。要么你想同时维护这两个版本(因此,你几乎有两个独立的项目,所以两个主人,没问题),或者你想在同一个项目上做所有事情。
如果你想在同一个项目上"stay",你需要的不是第二对master/develop,而是或多或少的v2分支,所有功能都有 v2/feature 个分支。一旦您认为您的 v2 已准备好投入生产,将其合并到开发中,然后在完成所有集成过程后合并到主版本中。
我当前的解决方案是第二个模式 http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows(集成管理器工作流程),其中我有一个 开发人员 public,它是 blessed repository same developer public fork 当我和我的同事在 fork 上开发时,我们已经克隆了 2 个开发人员私有存储库。
在我们的私有存储库中,我们使用 git-flow 工作流 http://michelebologna.net/2013/11/git-flow-il-modello-di-versioning-che-utilizzo/
在我的开发人员私有存储库中,我将上游存储库设置为 blessed 存储库,然后从 blessed 存储库 master[=24 获取并拉取更新=]到私有仓库开发
我在 SouceTree 上使用 git-flow 来管理我的项目; 到目前为止一切正常,但现在我想重新定义与后端的接口(总而言之,我将把对服务器的 ajax 调用替换为对新 oData 对象的函数调用...) 好的,我的愿望是有两个分支:
- “遗留”掌握和开发分支,我可以从中继续使用所有 ajax 接口扩展我的项目
- “新”掌握和开发分支,我可以从中进行大量操作以连接新的 oData 对象和其他后续更改。
第一个(不好的)解决方案是从“遗留”开发中创建一个“新”发布分支。
你还有其他解决办法吗?
p.s.
fork 冷是解决方案,但我不能 fork 我的存储库。我没有 GitHub 帐户,我在网络磁盘上有一个远程裸存储库。
我试图将 old_repo 克隆到 fork_repo,但是当我尝试将本地更改推送到远程 fork_repo 时,我收到此消息:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
Pushing to G:\Sorgenti\SorgentiGIT\intra_fork
remote: error: refusing to update checked out branch: refs/heads/master[K
remote: error: By default, updating the current branch in a non-bare repository[K
remote: error: is denied, because it will make the index and work tree inconsistent[K
remote: error: with what you pushed, and will require 'git reset --hard' to match[K
remote: error: the work tree to HEAD.[K
remote: error: [K
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to[K
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into[K
remote: error: its current branch; however, this is not recommended unless you[K
remote: error: arranged to update its work tree to match what you pushed in some[K
remote: error: other way.[K
remote: error: [K
remote: error: To squelch this message and still keep the default behaviour, set[K
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.[K
我觉得你不太理解 master 分支的含义。
主分支反映了项目的稳定(运行 生产,或 准备好 投入生产)版本。 Develop 是您的主要开发分支,一旦您的功能完成,您所有的功能分支都会合并到这里。
准备好发布产品的新版本后,将开发合并到 master 中。
你要做的是维护两个 master 和两个 develop 分支。那是胡说八道。您不能 为一个 项目设置两个主分支。要么你想同时维护这两个版本(因此,你几乎有两个独立的项目,所以两个主人,没问题),或者你想在同一个项目上做所有事情。
如果你想在同一个项目上"stay",你需要的不是第二对master/develop,而是或多或少的v2分支,所有功能都有 v2/feature 个分支。一旦您认为您的 v2 已准备好投入生产,将其合并到开发中,然后在完成所有集成过程后合并到主版本中。
我当前的解决方案是第二个模式 http://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows(集成管理器工作流程),其中我有一个 开发人员 public,它是 blessed repository same developer public fork 当我和我的同事在 fork 上开发时,我们已经克隆了 2 个开发人员私有存储库。 在我们的私有存储库中,我们使用 git-flow 工作流 http://michelebologna.net/2013/11/git-flow-il-modello-di-versioning-che-utilizzo/
在我的开发人员私有存储库中,我将上游存储库设置为 blessed 存储库,然后从 blessed 存储库 master[=24 获取并拉取更新=]到私有仓库开发