git push 之前忘记 git pull,已经commit了怎么办?
PHP中文网
PHP中文网 2017-05-02 09:38:40
0
7
1477

git push 之前忘记 git pull,怎么办?

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(7)
大家讲道理

Forgetting to pull before pushing will have a consequence, that is, if you push now, there will be a conflict (the error message is probably that the online version and the local version are out of sync and need to be merged), and the push will fail.

Then you need to pull it down, merge it, and then you will be prompted for a conflict, then resolve the conflict, and then push it.

Of course, if it is a small personal project, you can also add -f to force submission after confirming that there is no problem. The consequence is that the online version is forced to be overwritten (Don’t use it like this for multi-person collaboration! Don’t use it like this for multi-person collaboration! Don’t use it like this for multi-person collaboration! )

曾经蜡笔没有小新

You can pull after committing, otherwise Git is useless. When developing with multiple people, do you have to wait for others to finish writing and pull their code before you can start writing?

大家讲道理

git reset

習慣沉默

It should have been pulled after commit

大家讲道理

git add
git commit -m ""
git pull
git push

迷茫

git pull,然后在本地merge,再git push

左手右手慢动作

git reset
git checkout

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!