git全局配置用戶
git config --global user.name “xxx”
git config --global user.email “xxx.cn”
情況1、存在git倉庫
git clone url.git
//cd xx
//touch README.md
//git add README.md
//git commit -m "add README"
//git push -u origin master
情況2、已存在文件夾,但沒有提交到git倉庫
cd existing_folder
git init
git remote add origin url.git
git add .
git commit -m "Initial commit"
git push -u origin master
情況3、創建分支?(未嘗試)
cd existing_repo
git remote rename origin old-origin
git remote add origin xxx.git
git push -u origin --all
git push -u origin --tags