HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git ignore — Show/update `.gitignore` files. Part of `git-extras`. See also: `git ignore-io`. More information: <

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandfilesupdateshowgitignorecligit ignorepart

Problem

How to use the git ignore command: Show/update .gitignore files. Part of git-extras. See also: git ignore-io. More information: <https://github.com/tj/git-extras/blob/main/Commands.md#git-ignore>.

Solution

git ignore — Show/update .gitignore files. Part of git-extras. See also: git ignore-io. More information: <https://github.com/tj/git-extras/blob/main/Commands.md#git-ignore>.

Show the content of all global and local .gitignore files:
git ignore


Ignore file(s) privately, updating .git/info/exclude file:
git ignore {{file_pattern}} {{[-p|--private]}}


Ignore file(s) locally, updating local .gitignore file:
git ignore {{file_pattern}}


Ignore file(s) globally, updating global .gitignore file:
git ignore {{file_pattern}} {{[-g|--global]}}

Code Snippets

Show the content of all global and local `.gitignore` files

git ignore

Ignore file(s) privately, updating `.git/info/exclude` file

git ignore {{file_pattern}} {{[-p|--private]}}

Ignore file(s) locally, updating local `.gitignore` file

git ignore {{file_pattern}}

Ignore file(s) globally, updating global `.gitignore` file

git ignore {{file_pattern}} {{[-g|--global]}}

Context

tldr-pages: common/git ignore

Revisions (0)

No revisions yet.