Skip to content

Instantly share code, notes, and snippets.

@mrsndmn
Last active October 27, 2019 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrsndmn/398cb8ee738acaa8c05cd1a917a24d6c to your computer and use it in GitHub Desktop.
Save mrsndmn/398cb8ee738acaa8c05cd1a917a24d6c to your computer and use it in GitHub Desktop.
git mr function to not to write task num each time
gcamm() {
local b="$(git_current_branch)"
local task="$(perl -E 'print( (split /\./, $ARGV[0], 2)[0] )' $b)"
echo $task
[[ "$task" != "" ]] && git commit --verbose -am "$task $1"
}
gcmm() {
local b="$(git_current_branch)"
local task="$(perl -E 'print( (split /\./, $ARGV[0], 2)[0] )' $b)"
echo $task
[[ "$task" != "" ]] && git commit --verbose -m "$task $1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment