I git init
on an existing repository and force pushed it to master.
I had an earlier version of repository with few (around 100-120) files of which I don't have a local copy ,Now the whole repository has been over written and I have only 2 new files.
I have tried cloning repository and tried getting earlier logs , but there is only one commit in entire repository log.
How can I get back the repository to normal version ?
These was code i used :
git init
git add .
git commit -m "New files"
git remote set_url origin "Link to my repository.git"
git push origin +master
If you've force-pushed over your old content on GitHub, you can contact GitHub Support and they can find the old version and possibly create a branch in that repository for you with the old contents that you can then fetch.