Git push origin “whatever my current branch is?”

Simple solution to save on typing long branch names

Why did not I know about this sooner? When you do not remember your current branch and you need to push quickly whatever you just committed then use

git push origin head

Here head resolves to the current branch name and you do not need to type it in.

Mind blown.

Last updated on by Attila