Our main development branch is called "dev" in this scenario.
Accidentally did a "git push -f origin dev" which pushed my outdated local dev branch to shared repo.
can't seem to find the hash for this change using git log to reflog.
How can I restore the repo ?
I would suggest the following:
1. First, check the following documentation:
Please check all the steps there, including the sections titled
See if you can recover the branch with any of the methods described there.
2. If the above is not possible: are there any other users with access to this repository?
If so, I would suggest asking them if anyone has the previous version (the one before your force push) of the dev branch in their local clone. If so, they can force push it to the repo.
3. In case neither step 1 nor step 2 work for you, we may be able to recover a backup of the repo for you prior to the force push.
Please note that this is only possible if the force push was made during the last 7 days; we are not able to recover any content older than 7 days.
If neither step 1 nor step 2 work for you, and the force push was made during the last 7 days, then:
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.