• The patterns in a gitignore file are always relative to the location of the gitignore directory. It is also possible to create multiple gitignore files.
  • If there is a separator at the beginning or middle (or both) of the pattern, then the pattern is relative to the directory level of the particular .gitignore file itself.
  • Github offers both public and private repositories to store the code. This tutorial focuses on what is gitignore and how to create a gitignore file.
  • We use this list to populate the .gitignore template choosers available in the GitHub.com interface when creating new repositories and files.
  • If you have complicated .gitignore patterns, or patterns spread over multiple .gitignore files, it can be difficult to track down why a particular file is being ignored.
  • A local .gitignore file is usually placed in the repository’s root directory. However, you can create multiple .gitignore files in different subdirectories in your repository.
  • If you don't know how to use gitignore i think that best way to learn it is to look at some good use case example (like the one generated by the gitignore.io.
  • Git can specify which files or parts of your project should be ignored by Git using a .gitignore file. Git will not track files and folders specified in .gitignore.
  • The .gitignore file is a text file that tells Git which files or folders to ignore in a project. A local .gitignore file is usually placed in the root directory of a project.