I have React project in IntelliJ and GitHub. I found that I forgot to add /.idea folder into the .gitignore file. Here is what I did:
I add
/.idea
to the .gitignore file, and rungit add .
,git commit -m 'add gitignore'
, andgit push origin master
.After pushed the changes again. I found that the /.idea folder was still on the GitHub, so I manually deleted the /.idea folder on GitHub.
Because I wanted to make sure every synchronized between my local and GitHub, I ran
git pull
. After running the command, everything in my local IntelliJ disappeared...
However, I go to the file explorer, everything is still in the folder.
Why is everything in my IntelliJ disappeared?
How can I re-import my project into the IntelliJ?