Reputation: 10633
It looks like both accomplish the same task to me.
Are there cases in which they are different?
What is the difference between:
git push origin HEAD
git push origin [current-branch-name]
Upvotes: 11
Views: 11335
Reputation: 37842
They mean exactly the same, since HEAD points to the tip of the current branch. See this answer for reference.
The only case in which this would not give the same result is when you are in detached HEAD state; but in that case, what is your definition of [current-branch-name]
?
Upvotes: 13