• Home
  • Blog
  • Projects
  • Bookshelf
  • About

Quick Git






This is a really simple alias that I think I found originally on Twitter a while back - and since then it's been my go-to way to work on repos that I'm effectively the only contributor:

Usage:

Explanation:

This little alias/function:

  • Adds all changes to be staged
  • Commits with the provided message
  • Pushes it to the remote tracking branch

This little pattern has been so useful that it's prevented me from experimenting with because this is just too easy. I rarely need to use git branches for most of the things I do as side projects so this has been my go to!


Tags:

Loading...

Published 📅:
Last modified 📝:
Location 📍: Boston, MA

Related Posts

snippet

Progressive Identifiers

Published:

Multi-step Native HTML Forms

Published:

Git Co-Authorship

Published:

useInterval

Published:

Git

Git Co-Authorship

Published:

Git Notes as a Tool for Thought

Published:

(Ab)using Git as yet another tool for thought!

← Back to all snippets
snippet
Git
Bash
Share this snippet on Bluesky
See discussion on Bluesky
git
jj
# the git zsh plugin aliases gp as git push
# but we want to override it
unalias gp
gp() {
  git add .
  git commit -m "$1"
  git push
}
gp "commit message here"
....
....
....
....
....
....
....
....