git使用总结

git常用命令:

1:git  clone  url

从远程仓库拉取代码, url为远程仓库的地址

2:git branch -a

查看本地分支和远程分支

3:git checkout  branchname

切换分支

4:git remote  add  branchname  url

远程创建一个分支 branchname

5:git pull branchname remotebranch:localbranch

从远程分支拉取代码并合并到本地分支

6:git fetch  branchname remotebranch:localbranch

从远程分支拉取代码到本地

原文地址:https://www.cnblogs.com/warrior4236/p/12524306.html