That being said, in order to use git push -delete, you need to specify the name of the branch on the remote repository not the name of your remote branch. Afterwards, git branch -r will show you an updated list of branches that really exist on the remote: And those you can delete using git push. This will automatically get rid of remote branches that no longer exist on the remote. In order to do that, you explicitly need to prune the list of remote branches: git fetch -prune However, by default, git fetch does not remove remote branches that no longer have a counterpart branch on the remote. This automatically gets an updated list of branches from the remote and sets up remote branches in the local repository, also fetching any commit objects you may be missing. The usual way to update the list of remote branches is to use git fetch. So the set of remote branches represent the state of the remote repository. Remote branches are local branches that map to branches of the remote repository. This may sound a bit confusing but to understand it, you have to understand that there is a difference between a remote branch, and a branch that exists in a remote repository. The command git branch -a shows remote branches that exist in your local repository.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |