设置了HTTPS需要切换为SSH

  1. git remote rm origin
  2. git remote add origin 你的gitssh地址
  3. git push -u origin master

同时上传多个git仓库

绑定对应仓库

  1. git remote add gitee 你的gitssh地址
  2. git push -u gitee master
  3. git remote add github 你的gitssh地址
  4. git push -u github master

上传对仓库

  1. git push github master
  2. git push gitee master

创建及切换分支

  1. git branch 分支名
  2. git checkout 分支名

合并分支

  1. git check master
  2. git merge 需要合并的分支
  3. git push 源名 master

其他指令

  1. 更新远程分支列表
  2. git remote update origin --prune
  3. 查看所有分支
  4. git branch -a
  5. 删除远程分支
  6. git push origin ---delete 删除的分支名
  7. 删除本地分支
  8. git branch -d 删除的分支名