git分支创建以及一些常见问题
查看当前分支 : git branch >> git branch a_branch b_branch * master 切换分支/创建分支(当此分支不存在是将会创建此分支): git checkout branch_name ##切换到a_branch分支 >> git checkout a_branch 如果你要将现有仓库的代码克隆下来: git clone url git clone https: / / github . com / . . . 如果你要取回远程某一分支的提交: git pull origi如果我们已经通过git cn branch_name git pull origin branch_name 上传文件 git add . git commit - m "your annotation" git push origin branch_name git commit 撤销操作 : git reset -- soft HEAD^ git add 和 git commit 撤销 : git reset -- mixed HEAD^ git status 查看当前状态 来源: CSDN 作者: gallos 链接: https://blog.csdn.net/qq_40760617/article/details/103705093