Useful Git Aliases

If you’re a software developer, you most likely use git. Many people are not aware that you can create an alias for commands. Creating alias will make commands easier to remember and quicker to type. Here are some of my favorite git alias I use on a regular basis.

Short for git status

alias gs="git status"

Quickly commit with wip message

alias wip='git add . && git commit -m "wip"'

Updates your branch and submodules

alias gpa = "!git pull --rebase --prune [email protected] && git submodule update --init --recursive"

Reset all changes (use with caution)

alias nah="git reset --hard && git clean -df"

 

Leave a comment below on your favorite alias commands.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.