for reference : https://www.david-merrick.com/2017/08/04/how-to-remove-the-idea-folder-from-git/
Here is what the above code is Doing:
1. Create a .gitignore file in the root of your project.
2. Add the following line to the .gitignore file:
3. Commit the .gitignore file to your repository.
4. Delete the .idea folder from your project.
5. Commit the deletion of the .idea folder.