ignore files in git

A common problem we have in our git directories are files that are generated automatically. You can do a simple thing to prep for things by creating a .gitignore file in the root of your git directory. For example here is one of mine:


In this example I do a couple things.

  1. ignore the file generated.conf that gets created nightly by a script.
  2. ignore all files that end with .swp. This is useful just in case I’m using VI on a file somewhere in the directory.
  3. ignore the folder named RCS. There’s some legacy still here ;).

There you go! Enjoy ignoring those files. Check out the untrack files in git post I made awhile ago.

This entry was posted in software, tips and tagged , , . Bookmark the permalink.

3 Responses to ignore files in git

  1. Paul says:

    This was a big help. Thanks.

  2. Tom says:

    Helpful, thank you.

  3. Tagnu says:

    Thanks again!

Leave a Reply

Your email address will not be published. Required fields are marked *