mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Add command git-touch.
This commit is contained in:
parent
75af76d2ac
commit
86156ae011
|
|
@ -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
8
bin/git-touch
Executable file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
filename=$1
|
||||
|
||||
test -z $filename && echo "filename required" && exit 1
|
||||
|
||||
touch $filename \
|
||||
&& git add $filename
|
||||
Loading…
Reference in a new issue