Hacker News new | past | comments | ask | show | jobs | submit login

Repeat after me: git, is, not, a, deployment, tool



Why? Not?


I think the main reason is it's sensible to pass the source code through a process that organises and optimises it for release to a specific environment. My first assumption seeing a git repo used in this way would be that someone was cutting corners and probably doing bad things like committing secrets to the repo, things like that.

If the person setting it up is aware of the potential pitfalls and has a good explanation for the process - particularly if there is no build step involved and secrets are managed appropriately, then it can be fine.


You can do all that with a pre-commit or post-commit hook.


It goes further than that, those were just examples. The principle of least knowledge, and the principle of least privilege, guide deployment to a process that does not include the source code on a production server. But like I said, there are ways for it to be a reasonable approach if properly justified


Then you’re checking in artifacts generated from source code (for this method that relies on git push to work).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: