0

I have read all the previous topics with the advice on how to use command prompt. But let's look at windows users.

I'm using GitHub desktop, just simple install from the site

I don't have access to command prompt version of Git. I have .idea folder that I want to exclude from being tracked. Any ideas how?

No matter which slashes I use, Git keeps track of this folder.

Undry
  • 427
  • 2
  • 15

2 Answers2

1
  1. delete .idea from your project and commit the change
  2. create a .gitignore file in the root dir of your project
  3. add .idea to .gitignore
  4. commit and push the above change (ensuring no .idea dir is present)

You should have access to a command prompt in the Windows OS. I haven't used it in a while but if you hit windows key + R this should still bring up the Run dialog. In here enter cmd, hit enter and the command prompt should load up.

Rob Evans
  • 2,822
  • 1
  • 9
  • 15
  • I have edited the post, that I don't have access to Git included command line. Thanks for your instructions. It seems it worked great. – Undry Sep 17 '20 at 13:45
  • If I can recommend you for future users you can specify "delete from your project" to be more specific like "copy from your project to safe location, delete it" and "5. Copy back the folder." – Undry Sep 17 '20 at 13:48
0

I can recommend to use this .gitignore from Intellij. You can ignore the complete folder with .idea/*, but I would not recommend to do this. There are only some special files which should be ignored.

But first, it should be necessary to delete the complete folder from the remote repository. For this @Rob Evans has a nice step by step guide

flaxel
  • 4,173
  • 4
  • 17
  • 30
  • I appreciate there are two schools of thought on whether to include the `.idea/` dir. I personally see it as a tool dependency and an attempt at vendor lock in. No dev should need to use a particular IDE and committing files from each and every IDE would lead to a mess. I vote for not committing anything - its not necessary (at all). There's nothing in the .idea dir that can't be provided by a good build tool. – Rob Evans Sep 18 '20 at 14:40
  • Yes I agree. Sometimes I find it nice because you can share the coding styles. But it only works if all people are working with the same IDE and in an open source project this is not possible. – flaxel Sep 18 '20 at 19:23
  • If you want to share coding standards plugins like Checkstyle, which is not IDE dependent, are better – Rob Evans Sep 19 '20 at 20:38