The Nastiest Git Script I Love To Use

It’s called changes.

Here’s how I tend to use it:

# editing a file in a Git project
$ git add $FILE_I_CHANGED
$ changes

It needs to be located in a PATH-included directory, I usually put mine into an own folder called ~/local/bin.

Not For Team Use

I wouldn’t run it on a non-private non-early-stage project. All it does, is create a new commit with the message “changes” and push it.

The script?

#! /bin/bash

set -euo pipefail

git commit -m "changes"
git push

Because most commits for my private projects won’t benefit from a more informative message, and I value the reduced friction.

It’s been surprisingly handy. Yes, it’s kind of nasty, but my “tiny tweak” workflows have never been more smooth and enjoyable.

Level up Your Docker Skills!

Join over 1700 other developers, learning something new about Docker every week.

Enter your email below for a curated tour of my most helpful writing and to get notified about new articles.

    (About the content, privacy, analytics and revocation).

    We won't send you spam. Unsubscribe at any time.