大家讲道理2017-05-02 09:40:40
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! )
曾经蜡笔没有小新2017-05-02 09:40:40
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?