Feedback

Chat Icon

Learn Git in a Day

Everything you need, nothing you don't

Keep Junk Out of Your Repo
69%

Pattern Matching in a Nutshell

The .gitignore file uses simple patterns to match filenames and paths. Here are the most common ones:

A filename like *.pyc matches any file ending in .pyc, anywhere in the project. The * is a wildcard that means "anything".

A folder like __pycache__/ matches the folder and everything inside it. The trailing / tells Git this is a folder, not a file.

A specific file like .env matches exactly that filename in the project root.

A comment

Learn Git in a Day

Everything you need, nothing you don't

Enroll now to unlock all content and receive all future updates for free.

Unlock now  $9.99$7.49

Hurry! This limited time offer ends in:

To redeem this offer, copy the coupon code below and apply it at checkout:

Learn More