You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Join now to unlock these features and more
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: