Last Updated: February 09, 2019
·
867
· jphenow

Fast git commit w/ message

I do git commit -m "Message here" pretty often. I wanted that to involve less typing:

# ~/.gitconfig
[alias]
  cm = "!f() { git commit -m \"$*\"; }; f"

Now I can run:

$> g cm Message here

1 Response
Add your response

As in over a git alias? I go back and forth on that, myself. I've been leaning towards git-alias specifically because I know the one place I can see all of my git aliases then. Otherwise I have a few git aliases, Shell aliases, and shell functions strewn about.

over 1 year ago ·