一、初始化仓库
1.远程没有仓库
git init
git add . --把所有文件提交到仓库中
git commit -m "xxx" ---提交修改
2.远程拥有仓库
git clone git@github.com: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 git@github.com:xxxxx.git