I am working on git with another colleague and it seems like he erased all the changes I did in the repository in the last two weeks. When I check the history of the repository, the commits I did regarding 3 complete new files have disappeared.
I have now locally two repositories:
- repo1: contains the original history of the repository because I did not pull the changes from origin. It contains the three files I created plus their history.
- repo2: contains the latest version of the repository, i.e. nothing related to those 3 files
I checked this using "git log".
I have checked similar answers like in the following link: Restore deleted file with history in git
But the problem is that in repo2 the files don't have any existence. I tried to push the changes from repo1 into origin, but then I get issues and it doesn't seem to work.
Any ideas on how to fix this? Thanks in advance.
The branch is the master one.