git 常用操作
本地更新单个文件
git fetch
git checkout origin/master —file_name
Push出现问题
git clean -d -f
Automatic merge failed; fix conflicts and then commit the result.放弃本地更改
git reset --hard origin/master
Please commit your changes or stash them before you merge.
git commit -m "My message”
git stash
git stash pop
git reset --hard
用代码库中的文件完全覆盖本地工作版本. 方法如下:
git reset --hard
git pull

浙公网安备 33010602011771号