I pushed my code without putting .idea/
in .gitignore. But now when I realised it, I saw this SO answer. So when I tried to undo that commit/push using this SO answer, it works. But after adding .idea/*
to .gitignore, and then doing git add and pushing the code, the .idea directory appears again and I can see all my previous commits(which I did undo).
What to do now?