Hacker News new | comments | show | ask | jobs | submit login

I agree regarding `git push origin :branch`.

From the git man pages [0]

> git push origin master:refs/heads/experimental Create the branch experimental in the origin repository by copying the current master branch. This form is only needed to create a new branch or tag in the remote repository when the local name and the remote name are different; otherwise, the ref name on its own will work.

So, a direct substitution of `git push origin :experimental` says

    Create the branch :experimental in the origin repository by copying no branch
I definitely think that could use another layer of abstraction.

[0]: http://linux.die.net/man/1/git-push




git push origin refa:refb

  PUT a branch refb with the commit-ish refa
git push origin abc123:refb

  PUT a branch refb with the commit-ish abc123
git push origin :refa

  PUT a branch refa with the commit-ish null


Much more concise explanation, thanks!




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: