Git流程:在完成功能之前,我可以多次发布一个功能吗?

tra*_*nes 4 git git-flow

我开始使用git flow了.我创建了一个功能:

git flow feature start eval
Run Code Online (Sandbox Code Playgroud)

然后我做了一些工作并添加并提交了更改:

git add (files)
git commit -m "(description of commit)"
Run Code Online (Sandbox Code Playgroud)

我还没有完成这个功能,但是想把它推到外部仓库以支持它的夜晚:

git flow feature publish eval
Run Code Online (Sandbox Code Playgroud)

好的,到目前为止没问题.现在我再次工作,我想对外部仓库进行一些新的更改,但我仍在研究这个功能.但是当我跑步的时候

git add (new files)
git commit -m "(description 2)"
git flow feature publish eval
Run Code Online (Sandbox Code Playgroud)

它返回

Branch 'origin/feature/eval' already exists. Pick another name.
Run Code Online (Sandbox Code Playgroud)

但我的分支是feature/eval,所以如果我传递另一个分支名称git flow feature publish <name>,它将引发错误.

总而言之,我的问题是 - 当我处于某个功能的中间(未准备好完成)时,如何推送多个提交?我可以运行类似的东西git push origin feature/eval吗?

Kri*_*ján 8

git-flow该分支扩展名检查已不存在,以防止您或他人不小心覆盖它.它还会将您的分支配置为跟踪您刚刚publish编辑的远程分支,因此您现在可以随时git push进行更多更改.