Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not so bad as long as you don't push any untested changes. If I do something freaky with the index, I usually stash the leftovers and test the last commit. Like this:

  git add -i
  git commit
  git stash
  ./some_tests  # ...shoot, forgot something
  git add .     # whatever I forgot
  git commit --amend
  ./some_tests  # now we're good
  git stash apply
  git stash clear
  git push
On the hg side, you can use mq and record to get yourself in and out of the same kind of trouble, as someone else mentioned. I think these are essential but dangerous features that any good DVCS should have.

A better safety mechanism (than deleting the feature) is a pre-push hook that runs the test suite on every commit since the remote head. Not everyone needs that level of strictness, though.



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

Search: