Git(1) 常用命令

#强制覆盖本地代码

更新拉到本地

git fetch --all

撤销本地,暂存区,版本库(用远程的origin/develop替换本地,暂存区,版本库)

 

 

git reset --hard origin/develop

从远程同步代码

git pull

#创建分支

git branch b1

#切换分支(代码会被覆盖)

git checkout b1

#撤销本地修改

git checkout t1.txt

git checkout .

posted @ 2020-10-21 21:19  haohao1234  阅读(56)  评论(0编辑  收藏  举报