Git指令
1、分支管理
显示所有分支
git branch -a
切换git的HEAD分支(Git有一个名为HEAD的指针,它指向当前所在的本地分支(可以将其看作是当前分支的别名))
git remote set-head origin git checkout
切换分支
git checkout
创建分支
git branch
2、查看
查看状态
git status
查看git远程仓库
git remote -v
修改关联的远程仓库的方法
第一种:使用 git remote set-url 命令,更新远程仓库的 url
git remote set-url origin
第二种:先删除之前关联的远程仓库,再来添加新的远程仓库关联
# 删除关联的远程仓库
git remote remove
# 添加新的远程仓库关联
git remote add