Add command git-touch.

This commit is contained in:
Alex McHale 2010-10-15 10:36:17 -05:00 committed by Tj Holowaychuk
parent 75af76d2ac
commit 86156ae011
2 changed files with 13 additions and 0 deletions

View file

@ -31,6 +31,7 @@ Brew:
- git undo
- git update-extras
- git setup
- git touch
## git-contrib
@ -258,3 +259,7 @@ Remove the latest 3 commits:
## git-setup [dir]
Set up a git repository if one doesn't exist, add all files and make an initial commit. _dir_ defaults to the current working directory.
## git-touch [filename]
Call `touch` on the given file and add it to the current index. Used one-step creating new files.

8
bin/git-touch Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
filename=$1
test -z $filename && echo "filename required" && exit 1
touch $filename \
&& git add $filename