-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgg-init
More file actions
executable file
·37 lines (34 loc) · 831 Bytes
/
Copy pathgg-init
File metadata and controls
executable file
·37 lines (34 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
#
# (__) gg
# (oo)
# /------\/ Distributed under
# / | || the GNU GPL v3 License
# * /\---/\
# ~~ ~~ http://www.gnu.org
#
#
# 2014-08-02
#
# Author: wujinnnnn@gmail.com
installPath=/usr/local/bin
haveFile=`ls`
if [[ -z $haveFile ]];then
printf "you must have files to init\n"
exit 1
fi
printf 'Do you what to git init the directory like this?\n'
printf '\tgit init\n'
printf '\tgit add .\n'
printf '\tgit commit -a -m "init commit"\n'
printf '\tgit checkout -b develop\n'
echo "press ENTER to continue, press Ctrl+C to ESCAPE"
read temp
mkdir .gg-data
touch .gg-data/gg-config
touch .gg-data/gg-info
git init
git add .
git commit -a -m "init commit"
git checkout -b develop
cp $installPath/gg-pre-commit .git/hooks/pre-commit