如何使用 --no-ff 继续在分支分支上工作?

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

我从另一个分支

feature
创建了一个分支
dev
,并使用
这些说明
将其与--no-ff合并,最终得到如下图所示的树(但不是“掌握”它的
dev
):

现在我已经在

feature
上做了更多工作,并希望将其推送到
feature
分支(就像上图中
feature
序列中的下一个黄点)。我是否继续在这个分支上

$ git push origin feature

或者我必须这样做

$ git checkout dev
$ git merge --no-ff feature

每次我想推到

feature
?我想将
feature
分开。

git command-line git-branch
2个回答
1
投票

每次添加更多提交时,您不必将

dev
合并回
feature

您只需添加这些提交并推送您的
feature
分支即可。

如果您想检查一切是否仍然正常工作,您仍然应该在本地将

feature
合并到
dev


0
投票
  • get checkout dev
  • git merge --no-ff feature
  • git add <resolved-files>
  • git commit
© www.soinside.com 2019 - 2024. All rights reserved.