Delete local and remote branch with Git


Delete a branch in your local environment

git branch -D <branchName>

Delete a branch from the remote repository

git push origin --delete <branchName>
Advertisements

Git error: The remote end hung up unexpectedly


Problem:

$ git clone https://....
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

Solution:

$ git config --global --add core.compression -1
$ git clone https://....