Skip to main content

How to use git aliases to 10X your workflow

Updated 1 min readMarkdown

Did you think git config was only for setting your name and email?

You can also use to create shortcut commands, or "aliases" , and improve your git workflow!

Here's the command you'd run in your shell:

git config --global alias.<alias> <cmd>

For example, I have git init --bare" aliased to "git naked"

Screenshot 2021-09-16 15.16.23.png

Some aliases I've seen around that make me feel enlightened:

cm = commit -m
undo = reset HEAD~1
st = status
unstage = reset --soft HEAD^

So that's it folks! Have you any great aliases to share? I'm always looking for more ways to optimize my workflow, so share them here! Convene with you later 🧙🪶

You can read more about me or my current projects on my website

About the author

  • I'm a software developer in the Los Angeles area. I build web and fullstack applications, as well as participate in cybersecurity games (HTB, Vulnhub, OTW, etc).

No comments yet. Be the first to comment.