我在A电脑创建项目并git到github,然后我在B电脑clone一份接着使用B电脑继续写项目。
问题一:我在B写完项目推送到github,因为突然不能使用B电脑,只能用A电脑写项目,这里就出现版本冲突了?该怎么解决?
问题二:我学的git中只使用git协议推送项目,那么怎么使用ssh推送项目呢?
阿神2017-05-02 09:34:39
Question 1. It doesn’t matter if your project on computer B has not been pushed to Github yet. You can continue writing the project on computer A now, and then push it to Github and resolve the conflict when computer B is available. If your project on computer B has been pushed to Github, it is even simpler. Just pull the code on Github on computer A first.
Question 2. I think you haven’t figured out what the Git protocol is, because the only HTTP and SSH protocols commonly used on Github are the HTTP and SSH protocols, and there is no Git protocol. Since you have used Github, you don’t know how to push projects using the SSH protocol. Bar?
PHP中文网2017-05-02 09:34:39
Your code on A was not pushed to the remote in time. Manually modify the conflicts. In fact, you can treat your two computers as two people and create their own branches from the server git clone master.