Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Commit 649ef52

Browse files
committed
Change approach to what goes into this .gitignore
For a long time, I put rules for things like macOS ~/.DS_Store files, Emacs backup files, and similar stuff into every project's .gitignore file. Now I've come to the conclusion this is suboptimal. Instead, project-specific .gitignore files should only include what's specific to the given project, and for things like people's backup files or os-specific things, people should configure their git installation to use a global excludes file. Turns out that this is the practice recommended in GitHub's own documentation and some other people, e.g., https://augustl.com/blog/2009/global_gitignores/
1 parent d5c5d25 commit 649ef52

File tree

1 file changed

+25
-86
lines changed

1 file changed

+25
-86
lines changed

.gitignore

Lines changed: 25 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,31 @@
1-
# -*- sh -*-
2-
3-
# Compiled source
4-
# .............................................................................
5-
6-
*.com
7-
*.class
8-
*.dll
9-
*.exe
10-
*.o
11-
*.so
12-
*.dylib
13-
14-
# Compressed archives & package files
15-
# .............................................................................
16-
17-
*.7z
18-
*.dmg
19-
*.gz
20-
*.iso
21-
*.jar
22-
*.rar
23-
*.tar
24-
*.zip
25-
26-
# OS-specific things to ignore:
27-
# .............................................................................
28-
29-
.DS_Store
30-
.DS_Store?
31-
._*
32-
.Spotlight-V100
33-
.Trashes
34-
ehthumbs.db
35-
Thumbs.db
36-
37-
# Dropbox and similar files to ignore:
38-
# .............................................................................
39-
40-
.dropbox
41-
42-
# Emacs-specific things to ignore:
43-
# .............................................................................
44-
45-
*~
46-
.\#*
47-
\#*\#
48-
.git/COMMIT_EDITMSG
49-
auto
50-
*.synctex.gz
51-
TAGS
52-
53-
# LaTeX-specific things to ignore:
1+
# =========================================================== -*- gitignore -*-
2+
# @file .gitignore
3+
# @brief Files and patterns for files and subdirs that git should ignore
4+
# @date %CREATION_DATE%
5+
# @license Please see the file named LICENSE in the project directory
6+
# @website https://github.com/caltechlibrary/%PROJECT_URLNAME%
7+
#
8+
# The approach we suggest is to add ONLY project-specific rules here. Put
9+
# rules that apply to your way of doing things (and the particular tools you
10+
# happen to use) into a global git ignore file as described in the section
11+
# "Configuring ignored files for all repositories on your computer" here:
12+
# https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
13+
# (accessed on 2022-07-14). For example, Emacs checkpoint and backup files are
14+
# things that are not specific to a given project; rather, Emacs users will
15+
# see them created everywhere, in all projects, because they're a byproduct
16+
# of using Emacs, not a consequence of working on a particular project. Thus,
17+
# they belong in a user's global ignores list, not in this project .gitignore.
18+
#
19+
# A useful starting point for global .gitignore file contents can be found at
20+
# https://github.com/github/gitignore/tree/main/Global (as of 2022-07-14).
21+
# =============================================================================
22+
23+
# Ignore backup files created by our Makefile
5424
# .............................................................................
5525

56-
*.aux
57-
*.bbl
58-
*.blg
59-
*.fls
60-
*.loc
61-
*.lof
62-
*.log
63-
*.lot
64-
*.mp
65-
*.out
66-
*.toc
67-
*.toc
26+
*.bak
6827

69-
# Python-specific things to ignore:
28+
# Python-specific things to ignore (relevant because this is a Python project).
7029
# .............................................................................
7130

7231
__pycache__/
@@ -76,23 +35,3 @@ __pycache__/
7635
.eggs/
7736
.pytest_cache
7837
.coverage
79-
80-
# InnoSetup-specific things to ignore:
81-
# .............................................................................
82-
83-
*.~is
84-
85-
# Jupyter Notebook-specific things to ignore:
86-
# .............................................................................
87-
88-
.ipynb_checkpoints
89-
90-
# Ignore some common backup file patterns:
91-
# .............................................................................
92-
93-
*.bak
94-
95-
# Project-specific things to ignore:
96-
# .............................................................................
97-
98-
README.md.tmp

0 commit comments

Comments
 (0)