Simple Git Alias To Push The Current Branch
home // page // Simple Git Alias To Push The Current Branch

Simple Git Alias To Push The Current Branch

Hey you! Tired of having type all this nonsense just to push up the current git branch?:

$ git push origin my-super-long-branch-name

Well fear not, just add this simple git alias to push the current branch:

pu = !git branch | grep '^\\*' | cut -c3- | xargs git push origin

And then just type:

$ git pu

EDIT: Little did I know there’s a much easier equivalent command

$ git push origin HEAD

 

Leave a Reply

Your email address will not be published. Required fields are marked *