git常用操作之代码冲突解决

1、强制pull覆盖本地内容

STEP 01

git fetch --all   --all可省略

 

STEP 02

git reset --hard origin/master

STEP 03

git pull

git fetch 指令是下载远程仓库最新内容,不做合并 
git reset 指令把HEAD指向master最新版本

2、本地有修改,git pull代码时有冲突

https://blog.csdn.net/u011884440/article/details/71246562

https://blog.csdn.net/qq_36602939/article/details/79915031

https://www.cnblogs.com/juandx/p/5362723.html

https://www.cnblogs.com/tocy/p/git-stash-reference.html

 

posted @ 2019-03-25 19:52  天下布喵  阅读(173)  评论(0)    收藏  举报