Git Ignore File

By Xah Lee. Date: . Last updated: .

You can set git to ignore some files, such as emacs backup files, compiled files.

Each git project dir top level should have a ignore file file named .gitignore. This file contains file name patterns that git should ignore.

Here's a sample content of git ignore file:

# emacs

# compiled files

# packed files

# Logs and databases

# OS junk

For detail, see git help gitignore.

If you have a question, put $5 at patreon and message me.


  1. Install git
  2. Git Basics
  3. Git Ignore File
  4. Commit Files
  5. Push to Server
  6. Pull from Server
  7. Find Difference
  8. View Log
  9. Revert Change
  10. Branching
  11. Temp Save: git stash
  12. What's HEAD
  13. FAQ