[关闭]
@w1024020103 2017-02-13T18:53:32.000000Z 字数 898 阅读 549

Git push error

github git push bash


When I finished LinkedListDeque.java for proj1a, I wanted to push it to my Github repository cs61b, but I ran into some troubles doing it.

1.JPG-67.4kB

I searched the web and went to Cannot push to GitHub - keeps saying need merge,and I tried the solution with the most votes:

2.JPG-52.7kB

Things turned out worse! My github repository now only have file I just committed and I lost my skeleton for cs61b 17spring!!

3.JPG-59.6kB

Then I checked git remote -v and found out that my skeleton was 16 spring version, which is wrong. My local repository is 17spring skeleton, I think this is why it says that the remote hava something I don't have locally.

4.JPG-45.5kB

So I deleted the previous skeleton and changed it to 17spring by using git remote rm skeleton and git remote add skeleton https://github.com/Berkeley-CS61B/skeleton-sp17.git.
5.JPG-48.9kB

Now my situation seems to go back to the very start, I got evething locally, but my github site is empty, so I started from the very beginning as how to update things to github.
I found this article helpful:
关于初学者上传文件到github的方法

Finally,things turned out right!
6.JPG-94.9kB

7.JPG-53.3kB

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注