1

Hi so I created new repository from pycharm but didn't add gitignore at first so it also uploaded .idea folder. I tried to delete it from github by creating new text file and placing git command there:

git rm --cached .idea

However the .idea folder is still in the repository. How can I delete it?

Alex T
  • 3,529
  • 12
  • 56
  • 105
  • Try `-r`. See here: http://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore – Sebastian Apr 09 '17 at 09:22
  • silly question: did you push the changes? – bitoiu Apr 09 '17 at 11:06
  • I mean I created the text file in the master branch in github and then merged evertyhing (including the gitignore) from pycharm. Should I do it some other way? – Alex T Apr 09 '17 at 11:09
  • You might wanna take a look at my repo: https://github.com/datainvestor/scraperino – Alex T Apr 09 '17 at 11:11
  • 1
    Please see this answer, It will solve your problem: http://stackoverflow.com/a/32886427/4214976 – Gautam Krishna R Apr 09 '17 at 13:18

1 Answers1

1

You need to open a terminal (or git bash, or even put this on your file, but I recommend the terminal solution) and execute this line:

git rm -r --cached .idea

Which will remove your folder from the repository but not from your local machine.

Good luck :)

John Moutafis
  • 22,254
  • 11
  • 68
  • 112