I’m a panicked student, and here is why :
Our teacher has given us access to his server to upload our work.
Yesterday I did a commit XX to add a single file on my teacher’s server, and once it was completed… all the other files that were present on the master’s branch of my teacher’s server were gone.
So I did a second commit YY to try to sort of undo my previous commit.
What I did is that I tried to download as much copies as possible of the deleted files on other websites, I pasted them in my git folder, and I pushed this git folder on my teacher’s server.
Today, someone did a new commit on the master branch.
If I want to cancel my two comits but not delete the commit this person did today… would it work if I write git revert --no-commit XX…HEAD
then git revert --no-commit YY…HEAD
I’d appreciate if you could help me…
Thank you very much