I am using git along with git flow. Here git flow has a develop
branch. Whenever i need to start feature i type
git flow feature start new
a new branch feature/new
is created. Then i do the changes and commit them using
git push origin feature/new
After comitting the changes I finish feature using
git flow feature finish new
it deletes feature/new
branch locally. Now I am switched to develop branch by git flow and I again type
git push origin develop
which make changes to remote server develop
branch
If I type git branch -a
, the new branch got deleted from the local but it is there on the server with name remotes/origin/feature/new
Does git flow delete branches on remote server which are deleted at my local machine?
Please tell me if I am making some mistake.
Looking at the source it seems that the remote feature branch is deleted only if you call git flow feature finish
with -F
.
However, this fetches the remote before finishing the feature. From the docs:
-F fetch from $ORIGIN before performing finish
Otherwise you can delete the remote branch manually with:
git push origin :feature/new