arrow_back Back to Notebook
git
git
February 20, 2019

How to alias a command in git

Aliasing a command is very useful as it lets you shortcut a normal workflow and work more efficiently!

My favourite git upush

git upush is the equivalent of git push -u origin <current branch name> in other words the command you will use when pushing a branch which you have just created.

micro ~/.gitconfig
[alias]
	upush = !git push -u origin $(git symbolic-ref --short HEAD)

Thanks for reading!

John Wiseman

Full-Stack Software Engineer building scalable digital solutions. specializing in modern web technologies and mission-critical systems.

© 2026 Wiseman Systems Pty. Ltd.

Navigation

Start a Conversation

Ready to discuss your next project? Let's build something extraordinary together.

Get in Touch