Git 放弃本地修改 直接 pull 代码


git reset --hard HEAD    
git clean -f -d    
git pull

先 reset 然后清空
同时可以解决如下问题:

error: Your local changes to the following files would be overwritten by merge:
        test/main.go
Please, commit your changes or stash them before you can merge.
分享:

评论