Hello, the fact you are speaking about a gh-pages branch makes me assume you are working on a GitHub Page[1]. In this case yes, you must put the minified file in the repository, as GitHub won't minify it for you. Think of the gh-pages branch as the deployment area, which is coincidentally in the same Git repository, although on a separate branch. This, however, also means that you should not put the original file on the gh-pages branch, as it has nothing to do with the live environment.
Best, Gergely [1] https://pages.github.com On 22 Jan 2015 05:16, "Dale R. Worley" <[email protected]> wrote: > Owen Densmore <[email protected]> writes: > > What's the best practice for "derived files" in a git repo? > > Don't put them in the repository. > > There are only two cases: (1) The version of the derived file in the > repo is correct relative the files that it's derived from. In that > case, the derived file is redundant. (2) The version of the derived > file in the repo is *not* correct relative the files that it's derived > from. In that case, the derived file is dangerous. > > If you deploy something from a repository, it's best to have a separate > repository (or perhaps branch) whose commits are created automagically > by a build process from the commits of a source repository, and contain > only the files that need to be deployed. You *don't* want to have the > software developers responsible for keeping derived files in a source > repo synchronized with source files. > > Dale > > -- > You received this message because you are subscribed to the Google Groups > "Git for human beings" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
