一、初始化倉庫
1.遠程沒有倉庫
git init
git add . --把所有文件提交到倉庫中
git commit -m "xxx" ---提交修改
2.遠程擁有倉庫
git clone [email protected]:xxx/xxx.git
二、修改倉庫數據
https://www.jianshu.com/p/360bdda5157f
三、提交
1.個人提交
git push origin master
2.分支提交
推送本地分支local_branch到遠程分支 remote_branch並建立關聯關係
a.遠程已有remote_branch分支並且已經關聯本地分支local_branch且本地已經切換到local_branch
git push
b.遠程已有remote_branch分支但未關聯本地分支local_branch且本地已經切換到local_branch
git push -u origin/remote_branch
c.遠程沒有有remote_branch分支並,本地已經切換到local_branch
git push origin local_branch:remote_branch
提交遠程倉庫
git add .
git commit -m "xxx"
git push origin xxx ---xxx爲分支名稱
注:
origin爲綁定遠程倉庫名稱
git remote add origin [email protected]:xxxxx.git