I had a project which I wanted to push to Git. So I create a local repo (git init
). I had a .gitignore
in remote repo so I couldn't push my local files to remote. So I did git checkout origin/master
, and all my local files are gone.
Is there any way to recover them?
Here's what I have done:
git init
git add .
git commit -m "Initial commit"
git push origin master (failed)
git checkout origin/master