What should NOT be under source control?

前端 未结 24 2340
野的像风
野的像风 2020-12-04 07:24

It would be nice to have a more or less complete list over what files and/or directories that shouldn\'t (in most cases) be under source control. What do you think should be

24条回答
  •  眼角桃花
    2020-12-04 08:00

    An exception:

    4 or 5 different answers have said that generated files should not go under source control. Thats not quite true.

    Files generated by specialist tools may belong in source control, especially if particular versions of those tools are necessary.

    Examples:

    • parsers generated by bison/yacc/antlr,
    • autotools files such as configure or Makefile.in, created by autoconf, automake, libtool etc,
    • translation or localization files,
    • files may be generated by expensive tools, and it might be cheaper to only install them on a few machines.

    Basically, if you can't reasonably expect a developer to have the exact version of the exact tool they need, there is a case for putting the generated files in version control.

    This exception is discussed by the svn guys in their best practices talk.

提交回复
热议问题