Last active
March 2, 2023 06:29
-
-
Save wenijinew/d0dff8948c13f75547365b265bd7e315 to your computer and use it in GitHub Desktop.
Git Ignore Patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pattern | Description | |
---|---|---|
Blank Line | Match no files - can serve as a separator for readability. | |
Lines starting with hash(#) | Comment by default. | |
Trailing spaces | being ignored unless they are quoted with backslash (\). | |
! | Negates the pattern. | |
\ | escape sensitive chars(E.g. # or ! or trailing spaces). | |
Ends with slash(/) | match directory and any paths under it. | |
No slash(/) | match pathname relative to .gitignore file or the top-level of the work tree if not from .gitignore. | |
* | match anything except slash(/) | |
? | match any one char except slash(/) | |
[] | match any one char in a selected range. | |
A leading slash(/) | match beginning of the pathname. | |
Two consecutive asterisks (**) | match full pathname. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment