2 ms·
Pushing code to the "production repo" is a deliberate operation. Running "git push production" is as explicit as "./deploy-to-production.sh". Also, nothing aga
by vog 17y ago
Pushing code to the "production repo" is a deliberate operation. Running "git push production" is as explicit as "./deploy-to-production.sh".
Also, nothing against scripting. Mercurial needed a small hook, too. But Git's default push behaviour is not only worthless, it's dangerous and risks unexpected reverts of changesets. I already explained this in: http://news.ycombinator.com/item?id=1158563 http://news.ycombinator.com/item?id=1158563
Git should either have a sane default implementation, or should refuse to push to non-bare repositories. But its current implementation doesn't make any sense. Providing dangerous defaults because people shouldn't use it anyway? That's plain ignorance.
(However, I agree that automatic deployment is indeed a bad idea, no matter whether it uses push or pull. But that's off-topic.)