Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
buitrung3046yIs that you are viewing on different branches of the repo? Check the commits, nothing can just vanish.
-
They4636yChanged the github repository name.
Deleted old remote keys.
Added new remote key (pointing to the same repository but with updated name)
Tried to push, got an error:
Updates were rejected because the remote contains work that you do hint: not have locally.
Forced pushed (push successful)
Rechecked my repository and its now showing the cloned version of a repository I cloned 2-3 months ago. All updates I have done since the is gone. -
They4636y@11000100111000 yeah, I just wanted it to be there. Didn't expect that would cause this situation I'm in. Lesson learnt I guess.. Never -f push unless you know what damages it will do..
-
buitrung3046y@They I'm not sure how it happened, but when you rename the repo on git server, you should totally remove your current one in the local machine and clone the new one from git server. Your history is overridden now and there's no way back I guess...
-
tokumei21256yIf you're force pushing the master branch, you're probably doing something wrong and you should double check everything. Pretty much the only time that is correct is after rebasing a branch (which should never be done on master).
-
-
They4636y@karasube thanks for trying to help! But I'm redoing the project now (it was just to learn react).
The reflog returned the cloned repository I started off with if you wish to know.
I have no clue what I just did.
2 months ago I changed my repository name and today when I attempted to pushed an update I realised I had to update my remote key. Which I did.
Now..my repository now contains someone else's repository and my entire code base is non-existent.
Slightly pissed off that I'm now having to redo the entire work again but at same time I'm kinda amused on how I did this.
rant