Mercurial ignore the ".idea" folder form PyCharm?
Asked Answered
R

3

6

I am developing a Django app and it's my first time with Mercurial(using bitbucket).

I have done some commits without adding ".idea" folder from PyCharm to hgignore. Now I have added it to hgignore and want to remove .idea from the central repository but obviously do not want to delete the actual folder locally.

What's the proper way to handle this? I know this is a common thing, but I'm in the learning stage.

Thanks for the help in advance.

Ranita answered 31/8, 2011 at 16:42 Comment(0)
S
8

What it sounds like you want is for Mercurial to stop tracking everything under .idea. This should work (command issued in the repository root):

hg forget .idea\*
Scrapbook answered 31/8, 2011 at 16:54 Comment(2)
Bingo, that did it. Except when I used * it has issues (I guess with character escaping). Thank you Joel.Ranita
Well, I'm on windows. It's possible that wouldn't work quite the same way on *nix since directory separators are / there.Scrapbook
D
4

Use hg forget .idea. It's like hg remove, only it doesn't delete the file from your working directory.

Decury answered 31/8, 2011 at 16:57 Comment(0)
A
3

hg forget .idea\* should be your solution!

you could read up more on forget / remove here http://www.selenic.com/mercurial/hg.1.html

just for reference you can delete the .idea folder. pycharm will generate it the next time you open up your project files using it.

Archeozoic answered 31/8, 2011 at 16:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.