Actions

EmSys

Git - Ignoring Files

From EdWiki

Git - Ignoring Files

  • Often, we have a class of files that we don't want Git to automatically add or even show us being untracked.
  • These are generally automatically generated files such as files produced by the build system.
  • In such cases, create a file named .gitignore listing patterns to match them.
  • FileĀ : .gitignore
# Comment - this is ignored
*.o        # no .o files
*.obj      # no .obj files
*.a        # no .a files
!*lib.a    # but do track lib.a, even though we are ignoring .a files
  • Setting up .gitignore file before you get going is generally a good idea so yo don't accidentally commit files that you really don't want in your Git repository.