DEV Community

Cover image for Small shortcuts that made my Git workflow easier
Leonardo Rodrigues
Leonardo Rodrigues

Posted on

Small shortcuts that made my Git workflow easier

A tiny tool that installs 27+ Git aliases with one command — saving time, reducing friction, and keeping your focus on coding.


The reality of everyday work

Think about your typical workflow:

git status
git add .
git commit -m "fix: bug in authentication"
git push origin main
Enter fullscreen mode Exit fullscreen mode

Now multiply that by 20–30 times a day.
That’s hundreds of unnecessary keystrokes — every single day.

And this is just one of many flows we repeat automatically.


A simple solution: automate the pain away

After seeing a colleague using Git aliases inside .zshrc, I wanted something easier, cleaner, and consistent across multiple machines.

So I built git-alias-flow — an npm package that installs 27+ useful Git aliases directly into Git itself.

No OS-specific config files.
No manual setup.
Just one command.

Install

npm install -g git-alias-flow
gaf
Enter fullscreen mode Exit fullscreen mode

Done. All aliases installed, ready to use anywhere.


How it changed my workflow

Before:

git status
git add .
git commit -m "feat: add new feature"
git push origin main
Enter fullscreen mode Exit fullscreen mode

After:

git st
git ad
git cm "feat: add new feature"
git ps-bc
Enter fullscreen mode Exit fullscreen mode

Same tasks. Half the typing. Zero cognitive load.

Because aliases live inside Git itself, Windows/macOS/Linux behave exactly the same.


Aliases that really help

Here are the ones I use daily.

Status & navigation

git st    # git status
git ss    # git status -s
Enter fullscreen mode Exit fullscreen mode

Quick commits

git cm "message"  # git commit -m "message"
git ca            # git commit -v -a
Enter fullscreen mode Exit fullscreen mode

Branches

git bc            # git branch
git bcm old new   # rename branch
git ck main       # checkout main
Enter fullscreen mode Exit fullscreen mode

Smart pull/push

git pl-bc  # pull current branch
git ps-bc  # push current branch
git pnp    # pull + push (my favorite)
Enter fullscreen mode Exit fullscreen mode

Instead of:

git pull origin $(git branch --show-current) && git push origin $(git branch --show-current)
Enter fullscreen mode Exit fullscreen mode

Now it's simply:

git pnp
Enter fullscreen mode Exit fullscreen mode

Why this matters (if you love the terminal)

If you:

  • Prefer CLI over GUI
  • Jump between machines
  • Care about consistency
  • Want fewer typos and faster flow

Then aliases stop being shortcuts.
They become part of your muscle memory.

Real benefits

  1. Speed: less typing → more coding
  2. Consistency: same aliases everywhere
  3. Fewer mistakes: shorter commands are harder to mess up
  4. Productivity: focus on the code, not the commands

Installation and usage

Install

npm install -g git-alias-flow
gaf
Enter fullscreen mode Exit fullscreen mode

List all aliases

gaf h
Enter fullscreen mode Exit fullscreen mode

Or directly:

git h
Enter fullscreen mode Exit fullscreen mode

Customize

Aliases live in a simple YAML file:

# aliases/aliases.yml
st: status
ss: status -s
pl: pull
ps: push
# ... and 23 more aliases
Enter fullscreen mode Exit fullscreen mode

Edit → run gaf again → done.


The journey of creating it

When I first started using aliases, I realized:

  1. Setting them manually was tedious
  2. Syncing across machines was annoying
  3. Sharing with teammates wasn’t practical

So I built git-alias-flow to solve my own problem.
Now, on any machine, I run:

gaf
Enter fullscreen mode Exit fullscreen mode

…and everything is ready instantly.


What changed for me

Since I started using aliases consistently:

  • I type ~40% fewer Git commands
  • I make fewer mistakes
  • My workflow feels smoother
  • I stay more focused on building — not typing

Who this is for

This package helps:

  • Developers who love the terminal
  • Anyone who prefers CLI over GUI
  • Teams who want consistent workflows
  • Anyone who uses Git regularly

Why I wrote this article

If this tool saves even a few minutes of your day, or inspires you to create your own shortcuts, then it was worth writing.

Contributions, ideas, or new alias suggestions are always welcome.


Final thoughts

If you prefer working in the terminal, Git aliases can drastically reduce friction in your day-to-day work.
git-alias-flow makes the setup effortless — install once, use everywhere.

It’s not about being lazy.
It’s about being efficient and keeping your focus where it matters: writing code.


Try it now

npm install -g git-alias-flow
gaf
git st
Enter fullscreen mode Exit fullscreen mode

⭐ Support the project

If you found this useful, consider giving the repo a GitHub Star — it helps a lot!

👉 https://github.com/leorodriguesdev/git-alias-flow


Useful links

Open Source — contributions welcome!


Suggested tags:
#git #productivity #cli #terminal #developer-tools #workflow #nodejs #opensource

Top comments (0)