清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
#!/bin/bash #author sunbx@funshion.com #date 2013-10-10 #远程服务器git仓库创建,以及对上游版本库的注册 # project="project" if [ $# -eq 0 ] then echo "Usage: $0 <repository> <directory> " echo " <repository>:remote server url" echo " like :example.com[:port]/path/to/repo.git/" echo " <directory>:git_repo directory" exit fi cd $2 git init $project >> /dev/null cd $project git remote add shangyou file://$1 if [ $? -eq 0 ] then echo "########################" echo " Success!" echo "#########################" else echo "Fail!" fi