一些示例脚本存档
17 December 2013 编辑本文
新建远程和本地仓储
#!/usr/bin/sh
# _configure usr and project name
usrname=guyueshuiming
repository=kiwi
# server
server_basepath=~/dropbox/application/github.com
# client
client_basepath=~/github.com/
if [ ! -d $server_basepath ]; then
mkdir -p $server_basepath
fi
if [ ! -d $client_basepath ]; then
mkdir -p $client_basepath
fi
# _implement
git init --bare ${server_basepath}/${usrname}/${repository}
git init ${client_basepath}/${repository}
cd ${client_basepath}/${repository}
touch README
git add .
git commit -m "add readme"
git remote add origin ${server_basepath}/${usrname}/${repository}
git push origin master