mirror of
https://github.com/iwata/git-now.git
synced 2026-09-10 15:36:22 -04:00
Merge remote-tracking branch 'bleis/master'
This commit is contained in:
commit
6ff28b4b12
2
.vimrc
Normal file
2
.vimrc
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
nnoremap <Space>gn :<C-u>w<CR>:Git now<CR>
|
||||
nnoremap <Space>gN :<C-u>w<CR>:Git now --all<CR>
|
||||
10
git-now
10
git-now
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
PREFIX="from now"
|
||||
MESSAGE="[${PREFIX}] `date`"
|
||||
MESSAGE="[${PREFIX}] `date +\"%Y/%m/%d %T\"`"
|
||||
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
|
|
@ -9,7 +9,13 @@ then
|
|||
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
|
||||
elif [ $1 != "--rebase" ]
|
||||
then
|
||||
git add $@
|
||||
if [ $1 != "--all" ]
|
||||
then
|
||||
git add $@
|
||||
else
|
||||
git add -u
|
||||
git add .
|
||||
fi
|
||||
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
|
||||
else
|
||||
FIRST_NOW_COMMIT=`git log --pretty=oneline --grep="${PREFIX}" | tail -n 1 | cut -d " " -f 1`
|
||||
|
|
|
|||
Loading…
Reference in a new issue