diff --git a/Readme.md b/Readme.md index 252bbf5..1b9bc53 100644 --- a/Readme.md +++ b/Readme.md @@ -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. diff --git a/bin/git-touch b/bin/git-touch new file mode 100755 index 0000000..30e65ad --- /dev/null +++ b/bin/git-touch @@ -0,0 +1,8 @@ +#!/bin/sh + +filename=$1 + +test -z $filename && echo "filename required" && exit 1 + +touch $filename \ + && git add $filename