Explanation
If you create a file in your repository named .gitignore, Git uses it to determine which files and directories to ignore, before you make a commit.
A .gitignore file should be committed into your repository, in order to share the ignore rules with any other users that clone the repository.
Explicit Repository Excluded
If you don't want to create a .gitignore file to share with others, you can create rules that are not committed with the repository. You can use this technique for locally-generated files that you don't expect other users to generate, such as files created by your editor.
Use your favorite text editor to open the file called .git/info/exclude within the root of your Git repository. Any rule you add here will not be checked in, and will only ignore files for your local repository
Reference
No comments:
Post a Comment