Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Pull 更新到本地 和 本地文件有冲突的时候的3种处理方法 #19

Open
ClarenceC opened this issue Jun 8, 2017 · 0 comments

Comments

@ClarenceC
Copy link
Owner

ClarenceC commented Jun 8, 2017

Commit your changes or stash them before you can merge

当你本地的版本与远程仓库的版本不一样的时候,而你又想拉下来可以尝试这几种方法

1. Open New Branch

git checkout HEAD^ file/to/overwrite
git pull

2. Overwrite All Local file

git reset --hard
git pull

3.commit your changes befor you do the merge

git stash
git merge origin/master
git stash pop

4. pull remote and loacl

'git fetch -p'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant