What should and should not be in .gitignore for any language and IDE?



  • Is there any general pattern that git repository should always be added .gitignore What's not worth it?

    In this respect: https://ru.stackoverflow.com/q/474392/181472



  • As a rule, you should be added to .gitignore

    1. Databases. They have their own ways of tagging and use git to do so inappropriately or even dangerously.
    2. Files from the process and from the compilation of the project. As a rule, they're given names, like target/output/release/debug/♪ These files can be obtained from the original code, so their version doesn't make sense.
    3. The different side tools you put in the same project file. It's better not to keep them in the same file.
    4. Files generated by test framing, profiler, debagger, etc.
    5. The code-generated documentation is only if you don't generate it in a separate repository through which you start a document site.
    6. Code performance files: magazines*.logresults, etc.
    7. Temporary files of your text editor or design environment. Their name often ends with tidal: *~
    8. Operational system files, e.g. thumbs.db.DS_Store

    You should think.

    1. Big binary files. Especially if they are constantly updated regardless of the code version.

    Normally, you can't ignore it, you have to keep it.

    1. All git configuration files are pointless. It's the file. .git (which in any case cannot be added to the index) and other files: .gitattributes.gitignore
    2. Files that determine the structure of the project. They are usually created by the environment of development. Their loss at best threatens you with time to restructure the IDE project, the worst is the need for manual re-establishment.
    3. In fact, the code and associated resources.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2