|
|
|
|
|
by speleding
115 days ago
|
|
The article mentions .gitattributes but does not mention a super useful property you can put in that file: you can use it to specify that part of your repo should not end up on a production server. We have this line in our .gitattributes: /test export-ignore That means that when a "git export" happens from git to our production server it skips all test files. (In our case Capistrano does that, no additional configuration needed.) You never want test files on a production server and it saves disk space to boot. Normal usage is not affected, in development or testing you would always do a "git pull" or similar. |
|
There is also export-subst that is also used by git archive to create an output similar to git describe directly in a file.