Git Aliases That Boost Your Coding Speed By 10x

Discover powerful Git aliases that transform your workflow. Save time, reduce keystrokes, and code faster with these shortcuts.

Jean Emmanuel Cadet
By Jean Emmanuel Cadet Full-stack Ruby on Rails Developer
Git Aliases That Boost Your Coding Speed by 10x

• 4 minutes read

When I started using Git, I felt like I was in a maze of commands. Every time I wanted to commit my changes, I had to type: 

git add . && git commit -m "message" 

Then:

git push origin main 

It worked, sure, but it always felt repetitive and slow.

One day, after a long coding session, I thought, there must be a smarter way. Developers are supposed to automate things, right? So why was I typing the same commands again and again?

That’s when I discovered Git aliases.


The Day I Found My Flow

It started with something simple. I opened my terminal and added a few lines to my .zshrc file:

alias ga='git add'
alias gcm='git commit -m'
alias gps='git push'
alias gst='git status'
alias gl='git log --oneline --graph --decorate'

I saved the file, ran:

source ~/.zshrc 

And tried it out. NB: (source ~/.bashrc for bash)

Then something magical happened.

Instead of typing a long line, I just wrote:

ga . && gcm "Initial commit"

It was like Git finally spoke my language. Suddenly, I was moving faster, staying focused, and actually enjoying the process.

That small change gave me a strange sense of power and clarity. I realized I could shape my tools to fit the way I think, not the other way around.


Why Aliases Are More Than Just Shortcuts

At first, I thought aliases were only about saving time. But they are more than that.

✅ They make your workflow flow.
✅ They remove distractions.
✅ They help you stay in the creative zone where ideas come alive.

When you stop typing the same commands over and over, your mind stays where it matters most: on the problem you’re solving.

It’s like tuning your guitar before a performance. The sound was always there; you just made it easier to reach.


My Personal Git Alias Setup

If you want to make Git work for you, here’s the full set of aliases that changed the way I code:

# =====================================
# 🧩 Some Important Git Command Aliases
# =====================================

# --- Basic Commands ---
alias gi='git init'                              # Creates an empty Git repository
alias ga='git add'                               # Quickly add files
alias gst='git status'                           # Check repo status
alias gd='git diff'                              # Show diffs
alias gdf='git diff --name-only'                 # Show changed file names only
alias gb='git branch'                            # List branches
alias gco='git checkout'                         # Switch branches
alias gcob='git checkout -b'                     # Create and switch to a new branch

# --- Commit & Push ---
alias gcm='git commit -m'                        # Commit with a message
alias gcam='git commit -am'                      # Add and commit all changes
alias gca='git commit --amend'                   # Amend last commit
alias gpl='git pull'                             # Pull latest changes
alias gps='git push'                             # Push current branch
alias gpsh='git push origin HEAD'                # Push current HEAD branch
alias git-undo='git reset --soft HEAD~1'         # Undo the last commit but keep all file changes staged (useful when you commit on the wrong branch)

# --- Logs & History ---
alias gl='git log'                               # Log view
alias glo='git log --oneline --graph --decorate' # Pretty log view
alias glp='git log -p'                           # Log with patches

# --- Rebasing & Stashing ---
alias grb='git rebase'                           # Start a rebase
alias grbc='git rebase --continue'               # Continue rebase
alias grba='git rebase --abort'                  # Abort rebase
alias gsta='git stash push -m'                   # Stash with message
alias gstp='git stash pop'                       # Apply last stash

# --- Cloning ---
alias gcl='git clone'                            # Clone repos quickly


After adding them, reload your shell:

source ~/.zshrc

And you’re ready to go. NB: (source ~/.bashrc for bash)


The Bigger Picture

What I learned from this small experiment is that productivity is not just about doing more. It’s about removing friction, one keystroke at a time.

Every improvement, even a tiny one like creating an alias, adds up over time. It builds habits that make your work smoother and your mind freer to create.

We often think success in coding comes from mastering complex tools. But sometimes, it starts with something as simple as writing your own shortcuts.


Your Turn

If you haven’t yet customized your terminal, try it today.
Start with just 3 aliases. Pick the commands you type most.
Give your workflow a personal touch.
Make your tools feel like you.

Because coding isn’t just about solving problems. It’s about crafting your own way of thinking, your own rhythm, and your own flow.

Once you start shaping your environment, you’ll realize that you are not just writing code.
You are building your own creative system.

💌 Don’t miss out! Join my newsletter for web development tips, tutorials, and insights delivered straight to your inbox.

Thanks for reading & Happy coding! 🚀

Follow me on:

From My Dev Desk — Code, Curiosity & Coffee

A friendly newsletter where I share: Tips, lessons, and small wins from my dev journey, straight to your inbox.

    No spam. Unsubscribe anytime.