Florent Florent - 7 months ago 53
Git Question

Dealing with git, generated files and bower

I know that it is considered a bad practice to commit generated files to a git repository. But how to deal with bower?

Currently my library is built into a

directory which gets ignored by a
file. I don't want generated files pushed to the repository. The problem is that the library is also distributed as a bower component.

How can I reference the generated assets into my bower component when a new version got released? Should I create another repository to store those files? Should I commit those files to the git tagged version?


You've already mentioned your choices. There aren't really a best way. Choose what you prefer. Either create a new repo or commit the /dist folder. Both have upsides and downsides. Creating a repo makes it more cumbersome to update and committing makes the repo more bloated.

The Bower team is working on a way to publish releases to a server, which will resolve this issue.