Merge pull request #513 from lgastako/master

Add -m flag to git-setup to set the initial commit message.
This commit is contained in:
hemanth.hm 2016-04-20 21:45:36 +05:30
commit e7826a717c

View file

@ -1,5 +1,12 @@
#!/usr/bin/env bash
COMMIT_MESSAGE='Initial commit'
if [ "$1" == "-m" ]; then
COMMIT_MESSAGE=$2
shift; shift
fi
gitdirexists(){
if [ -d ".git" ]; then
echo ".git directory already exists, aborting"
@ -13,4 +20,4 @@ mkdir -p "$dir" \
&& gitdirexists \
&& git init \
&& git add . \
&& git commit --allow-empty -m 'Initial commit'
&& git commit --allow-empty -m "$COMMIT_MESSAGE"