Skip to content

What does .gitignore do? #22729

Discussion options

You must be logged in to vote

Hello @Jme7,

.gitignore is used for excluding certain files or directories from your commits that you don’t want committed to the main repository, such as temporary files created by IDEs for example. More info here.

As another, more simple example, on one of my projects I keep a folder called “OFFLINE_ASSETS” where I have binaries, personal notes, and some pre-production stuff that I don’t want to clutter the repo with. The contents look like this:

.gitignore
OFFLINE_ASSETS/

When committing changes, both the .gitignore file and OFFLINE_ASSETS folder are ignored.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants