What does .gitignore do?

I know, this is a newbie question… and this may be the wrong category to put this in. But I don’t understand this. Can anyone help?

Thanks in advance! :heart:

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.

1 Like

@sethclydesdale Ok, now I understand that. Thanks!

1 Like