The difference between trim in git

I originally wanted to delete the remote branch.

git push --delete <branchname> 

... did it for me. However, I do not understand the differences between the other teams:

 git push --prune ... git prune ... 

What are they needed for? The manual does not help me, as it sounds similar, and I expected them to do what I originally wanted.

+6
source share
1 answer

git prune acts in your local repository and removes objects (for example, commits and files that are no longer available from any branch or tag or from HEAD ). git push --prune acts on the remote repository and deletes branches that do not exist locally (be very careful with this command as it will delete all branches that you never checked locally; if your branch is known to your local repo only as a remote branch, it will be deleted remotely).

+2
source

All Articles