git本地与github的版本同步问题
ringa_lee
ringa_lee 2017-05-02 09:32:39
0
2
534

我在A电脑创建项目并git到github,然后我在B电脑clone一份接着使用B电脑继续写项目。

问题一:我在B写完项目推送到github,因为突然不能使用B电脑,只能用A电脑写项目,这里就出现版本冲突了?该怎么解决?

问题二:我学的git中只使用git协议推送项目,那么怎么使用ssh推送项目呢?

ringa_lee
ringa_lee

ringa_lee

reply all(2)
阿神

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?

洪涛

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.

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!