Comment

Comment by rspeer

     * "git push" into a repository with a working tree normally refuses
       to modify the branch that is checked out.  The command learned to
       optionally do an equivalent of "git reset --hard" only when there
       is no change to the working tree and the index instead, which would
       be useful to "deploy" by pushing into a repository.
Nice! This sounds like something that I expected Git to do since the first time I used it, which means that I ran straight into the unfriendly error messages that result from pushing to a checked-out repository.

Using hooks for simple deployments has always seemed clumsy compared to the thing that I originally imagined Git could do. I'm glad to hear that Git now supports this use case.

parent rspeer 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton