Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
MASTERING PYCHARM

You're reading from   MASTERING PYCHARM Use PyCharm with fluid efficiency to write idiomatic python code

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781783551316
Length 232 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nafiul Islam Nafiul Islam
Author Profile Icon Nafiul Islam
Nafiul Islam
Arrow right icon
View More author details
Toc

Ignoring files


In my project, I have my virtualenv set up in my .venv folder, and I certainly don't want to include it in my commit, so I have to make sure to ignore it. So, let's head over to Settings... and do the following:

Inside, we can choose to add either files or folders. Come to think of it PyCharm also generates project metadata and stores this data in the .idea folder, and I'll need to ignore that as well. After clicking on [3], we get the following window:

We can choose to ignore files, folders, or even patterns. For example, you can ignore all the compiled Python bytecode files by adding *.pyc in (C). In the preceding screenshot, we just ignored all the files under .venv. This works across VCSs.

Git users are in for a special treat. There is a special plugin called .gitignore that allows us to create a .gitignore file and get code completion in the .gitigore file:

This plugin allows you to create a new type of file called the .gitignore file, which, as you would might guess, allows...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime