.gitignoreIf you create a file in your repository named This file can be committed into the repository, thus sharing the rule list with any other users that clone the repository. Note that you can create a GitHub maintains an official list of recommended .gitignore files at this public repository. Global .gitignoreA global .gitignore file can also be very useful for ignoring files in every git repositories on your computer. For example, you might create the file at ~/.gitignore_global and add some rules to it. To add this file to your cross-repository configuration, run Here are some good rules to add to this file: # Compiled source # ################### *.com *.class *.dll *.exe *.o *.so # Packages # ############ # it's better to unpack these files and commit the raw source # git has its own built in compression methods *.7z *.dmg *.gz *.iso *.jar *.rar *.tar *.zip # Logs and databases # ###################### *.log *.sql *.sqlite # OS generated files # ###################### .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes ehthumbs.db Thumbs.db You may also want to check out GitHub's gitignore repository, which contains a list of .gitignorefiles for many popular operating systems, environments, and languages. Repository excludeLocal per-repository rules can be added to the Ignoring versioned filesSome files in a repository, which are versioned (_i.e._ they can't be Git lets you ignore those files by assuming they are unchanged. This is done by running the To make git track the file again, simply run |
Tutoriels > totoriel git >