目录
- git clone 克隆分支
 - clone
 - clone 指定分支
 
- 查询配置
 - 查看分支
 - 查看所有分支(包含本地分支和远程分支)
 - 查看远程仓库的分支(本地分支不会显示)
 - 查看本地分支(远程分支不会显示)
 
- checkout命令
 - 参考
 
git clone 克隆分支
clone
shell> git clone <远程仓库地址>
 
例子:
shell> git clone https://gitee.com/y_project/RuoYi-Vue
shell> git clone -b master https://gitee.com/y_project/RuoYi-Vue
 
clone 指定分支
shell> git clone -b <分支名> <远程仓库地址>
 
例子:
shell> git clone -b master https://gitee.com/y_project/RuoYi-Vue
shell> git clone -b master --depth=1 https://gitee.com/y_project/RuoYi-Vue
shell> git clone -b v3.8.6 https://gitee.com/y_project/RuoYi-Vue
shell> git clone -b v3.8.6  --depth=1 https://gitee.com/y_project/RuoYi-Vue
 
查询配置
shell> git config --list
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://gitee.com/y_project/RuoYi-Vue
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
 
查看分支
查看所有分支(包含本地分支和远程分支)
shell> git branch -a
* masterremotes/origin/HEAD -> origin/masterremotes/origin/master
 
remotes/开头的是远程分支- 不以 
remotes/开头的是本地分支 
查看远程仓库的分支(本地分支不会显示)
shell> git branch -rorigin/HEAD -> origin/masterorigin/master
 
查看本地分支(远程分支不会显示)
shell> git branchmaster
 
checkout命令
shell>  git checkout -t origin/dev
shell>  git checkout -t origin/master
 
参考
https://www.cnblogs.com/ShaYeBlog/p/5858484.html