Git alias:
unpublish = "!f() { git push ${1:-origin} :$(git current-branch); }; f"
Unpublish the current branch by deleting the
remote version of the current branch.
The remote name may be specified by the first argument and defaults to origin
.
Example:
# unpublish on origin
git unpublish
# unpublish branch on fork
git unpublish fork
Compare:
-
git publish & git unpublish (describes both)
-
git unpublish (this alias)