git常用

git教程:https://juejin.im/post/5ae072906fb9a07a9e4ce596

git图形管理工具: https://www.sourcetreeapp.com/

 

git小命令:

更新:git pull -u origin master:master  master是我的分支的名称
查看修改文件:git status
新增修改:git add -A
表示添加备注:git commit -m "备注说明"
提交到Git仓库:git push -u origin master:master  master是我的分支的名称

创建分支:

git clone -b htsp http://git.besoft.top/by/share-tour.git htsp(第一个  htsp是分支名  第二个是更新到指定目录)

切换分支:

git branch
git checkout -b dev

 

代码库覆盖操作   --hard最新的 
git reset --hard
git pull

撤销git提交

git reset --soft HEAD^

你可能感兴趣的:(git常用)