Skip to content

Github files got overwritten #22130

Discussion options

You must be logged in to vote

I assume what happened is that you didn’t have the history of the work done at school on your home machine. When you use “-f” with “git push” it will overwrite any conflicting history, which is why the other work got overwritten. It is highly recommended not to use -f unless you have double checked it is necessary and the state and history are correct.

In this situation I see only one thing you can do yourself: Get to the repository you used at school (or get a copy), and recover the work from there. Either merge the branches, or copy the files and make a new commit with them.

You could also try asking Github support if they have a backup, but I have no idea about the chances.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants