I had created a local throw-away branch temp
, and accidentally called
git push --all origin
which added it to my github repo.
I then deleted the temp
branch locally and did another
git push --all origin
but the branch still exists in github, though no longer associated with the master branch. How can I tell my remote repo to git rid of temp
branch?
The following command will solve your issue
git push origin :temp
This command has to be understood as "replace the remote branch temp
with nothing"
alternatively, you can also perform the following one, which is a shortcut to the one above.
git push --delete origin temp
For more information, you can refer to the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With