Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use gitignore in Pycharm?

Tags:

Similar questions like this one about how to ignore files in a git repo are typically answered by showing which git command to execute on the command line. Even this one, although it is PyCharm specific, does the same.

Is there a way to manage this file through the PyCharm GUI?

like image 202
cb4 Avatar asked Mar 27 '16 19:03

cb4


People also ask

Where do I put Gitignore file in PyCharm?

gitignore file in the VCS root directory, you can right-click anywhere in the Project window, choose New | File and type . gitignore in the New File dialog.

How do I ignore files in PyCharm?

Under the Version Control node, of the Settings dialog box, click Ignored Files. The Ignored Files dialog box opens. You can also add files to ignore list on-the-fly. A new file under the Unversioned Files change list, has Ignore command on its context menu.

How do I ignore files in Git ignore?

If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a . gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.


1 Answers

Try:

  1. Go to Settings
  2. Go to Plugins
  3. Search for: .ignore
  4. Install
  5. Restart PyCharm

.gitignore should now be included in .ignore along with .hgignore etc.

like image 75
Gavin Munro Avatar answered Oct 03 '22 00:10

Gavin Munro