Git global setup
git config --global user.name "袁秋"
git config --global user.email "yuanq@tembin.com"
Create a new repository
git clone http://git.tembin.com/tembin/oldriver-iOS.git
cd oldriver-iOS
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Existing folder or Git repository
git init
git remote add origin http://git.tembin.com/tembin/oldriver-iOS.git
git config --global user.name "袁秋"
git config --global user.email "yuanq@tembin.com"
cd /Users/tembin/Desktop/Tembin/Libra-iOS
cd /Users/tembin/Desktop/Tembin重构/Libra-iOS
// 创建分支
git branch tembin-Swift2.3
切换分支
git checkout Tembin-Swift3.0(分支名)
git checkout master
git checkout tembin-Swift2.3
git add .
git commit
上传到分支
git push -u origin Tembin-Swift3.0(分支名)
git push -u origin master
git push -u origin tembin-Swift2.3
网友评论