mirror of
https://github.com/iwata/git-now.git
synced 2026-09-10 07:26:29 -04:00
21 lines
345 B
Bash
Executable file
21 lines
345 B
Bash
Executable file
#!/bin/sh
|
|
|
|
PREFIX="from now"
|
|
MESSAGE="[${PREFIX}] `date +\"%Y/%m/%d %T\"`"
|
|
|
|
if [ $# -eq 0 ]
|
|
then
|
|
git add -u
|
|
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
|
|
else
|
|
then
|
|
if [ $1 != "--all" ]
|
|
then
|
|
git add $@
|
|
else
|
|
git add -u
|
|
git add .
|
|
fi
|
|
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
|
|
fi
|