4 ms·
You can actually add a git hook or two to make pushing work fine for non-bare destinations - but then you're trashing any local changes.
by windsurfer 17y ago
You can actually add a git hook or two to make pushing work fine for non-bare destinations - but then you're trashing any local changes.
- vog 17y agoThat's why I'm calling it a bug in Git. Other tools (Mercurial, Darcs) don't trash anything.
- windsurfer 17y agoIts a few more lines to prevent trashing.
- vog 17y agoThat's true, but unfortunately, trashing is the default. Without any hooks, the next "git commit" on the remote system would add a patch that reverts the uploaded changes. This is very contra-intuitive and could be the source of big mistakes. It's a really nasty trap if you don't watch out! I like more the approach of Marcurial and Darcs where "not trashing" is the default.