我正在使用git和git flow.这里git flow有一个develop分支.每当我需要启动功能我输入
git flow feature start new
Run Code Online (Sandbox Code Playgroud)
feature/new创建一个新分支.然后我做了更改并使用它们提交
git push origin feature/new
Run Code Online (Sandbox Code Playgroud)
在完成更改后,我完成了使用功能
git flow feature finish new
Run Code Online (Sandbox Code Playgroud)
它在本地删除 feature/new分支.现在我通过git flow切换到开发分支,然后我再次输入
git push origin develop
Run Code Online (Sandbox Code Playgroud)
它改变了远程服务器develop分支
如果我键入git branch -a,新分支从本地删除,但它在服务器上有名称remotes/origin/feature/new
git flow是否会删除在本地计算机上删除的远程服务器上的分支?
如果我犯了一些错误,请告诉我.
Ste*_*fan 36
查看源代码,只有在您调用git flow feature finish时才会删除远程功能分支-F.
但是,这会在完成功能之前获取遥控器.来自文档:
-F在执行完成之前从$ ORIGIN获取
否则,您可以手动删除远程分支:
git push origin :feature/new
Run Code Online (Sandbox Code Playgroud)
我要做的是:
git flow feature delete -f name_feature
Run Code Online (Sandbox Code Playgroud)
如果功能分支内有更改,则-f是必需的。
git push origin --delete feature/name_feature
Run Code Online (Sandbox Code Playgroud)
也就是删除远程分支。