Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@rubiii /gcm.sh
Created Nov 10, 2011

# doesn't work:
gcm() {
git commit -m "$@"
}
# supposed to be used like:
gcm fixed issue 113
# which should execute:
git commit -m "fixed issue 113"
# in double quotes so i can use single quotes
# inside the message! like:
gcm what's this s***?
@rubiii
Owner
rubiii commented Nov 10, 2011

kinda evil, but this seems to work:

gcm() {
  eval "git commit -m \"$@\""
}

single quotes need to be escaped though:

$ gcm who\'s responsible for this?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.