Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| git_ignore [2019/02/19 19:25] – [Basic .gitignore file] rpjday | git_ignore [2019/02/22 18:18] (current) – [Debugging gitignore files] rpjday | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Overview ===== | ===== Overview ===== | ||
| - | How to identify untracked files that Git should intentionally ignore when running numerous commands, such as '' | + | How to identify untracked files that Git should intentionally ignore when running numerous commands, such as '' |
| Some links: | Some links: | ||
| Line 8: | Line 8: | ||
| * [[https:// | * [[https:// | ||
| - | ===== Basic .gitignore file ===== | + | ===== Introductory .gitignore ===== |
| + | |||
| + | ==== Basic .gitignore file ==== | ||
| Excerpts from the Linux kernel source top-level '' | Excerpts from the Linux kernel source top-level '' | ||
| Line 58: | Line 60: | ||
| </ | </ | ||
| - | ===== Four levels of ignoring files ===== | + | ==== Recursive .gitignore ==== |
| + | |||
| + | Subdirectories can have more specific '' | ||
| + | |||
| + | < | ||
| + | # | ||
| + | # Generated files | ||
| + | # | ||
| + | bin2c | ||
| + | conmakehash | ||
| + | kallsyms | ||
| + | pnmtologo | ||
| + | unifdef | ||
| + | recordmcount | ||
| + | sortextable | ||
| + | asn1_compiler | ||
| + | extract-cert | ||
| + | sign-file | ||
| + | insert-sys-cert | ||
| + | </ | ||
| + | |||
| + | The Linux kernel source repo has over 200 '' | ||
| + | ===== Advanced ignoring ===== | ||
| + | |||
| + | ==== Four levels of ignoring files ==== | ||
| Each line in a gitignore/ | Each line in a gitignore/ | ||
| Line 67: | Line 93: | ||
| * Patterns read from the file specified by the configuration variable '' | * Patterns read from the file specified by the configuration variable '' | ||
| - | ===== Rationale for different levels of gitignore files ===== | + | ==== Rationale for different levels of gitignore files ==== |
| * Patterns which should be version-controlled and distributed to other repositories via clone (i.e., files that //all// developers will want to ignore) should go into a '' | * Patterns which should be version-controlled and distributed to other repositories via clone (i.e., files that //all// developers will want to ignore) should go into a '' | ||
| Line 77: | Line 103: | ||
| </ | </ | ||
| - | ===== Debugging gitignore files ===== | + | ==== Debugging gitignore files ==== |
| < | < | ||
| $ man git-check-ignore | $ man git-check-ignore | ||
| </ | </ | ||
| + | |||
| + | ===== gitignore gotchas ===== | ||
| + | |||
| + | * Since '' | ||