git - 如何做integrate the remote changes
迷茫
迷茫 2017-05-02 09:46:31
0
2
932

git push origin master
出现报错。

error: failed to push some refs to 'git+ssh://git@github.com/yufeiluo/newstart.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

我这样解决了,
git push -f origin master
现在想用提示的方法解决
You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
如果全部git pull回来,那不就把本地的覆盖了?

我是新手,赐教

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
小葫芦

1. If the local branch and the remote branch can be automatically merged, you can directly commit,然后push这样就可以了
2.如果不一样就需要先git pull,但是这个命令会自动合并分支,可以使用git fetch,然后手动合并然后git push

某草草

It is not recommended to use it directlygit push -f,强制push可能会覆盖别人的修改,使用git pullIt will not overwrite local modifications. If they can be merged together, they will be merged together. Just add/commit/push again. If there is a conflict, resolve the conflict and continue submitting.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!