Reputation: 96468
As far as I understand these two commands can remove remote-tracking branches. Is there any difference between them?
git remote prune <branch_name>
git branch -d -r <branch_name>
Upvotes: 1
Views: 237
Reputation: 129782
Yes. But you can prove it to yourself: copy your git repo and run each command in each copy. Then do a diff on the two .git folders within those repos.
Your prune command needs the remote name, not the branch name. This will delete all remote tracking branches that are not on the remote specified. Your branch -d -r parameter should be <remote>/<branch_name>
.
Upvotes: 1