Git 全局设置
git config --global user.name "xxxx"
git config --global user.email "xxxx@xxx.com"
创建一个新的存储库
git clone http://it.xxx.com/mtc/mtc-view-xxx.git
cd mtc-view-xxx
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
将现有文件夹里的项目上传到远程储存库
cd existing_folder
git init
git remote add origin http://it.xxx.com/mtc/mtc-view-xxx.git
git add .
git commit -m "Initial commit"
git push -u origin master
将现有 Git 存储库的项目转到另一个储存库
cd existing_repo
git remote rename origin old-origin
git remote add origin http://it.xxxx.com/mtc/mtc-view-xxx.git
git push -u origin --all
git push -u origin --tags