by mechanical_fish · 17y ago · 0 comments
I'm guessing that you could fiddle with git's hooks to discourage or even prevent this problem, if you wanted to. For example, you could refuse to allow "git push" to be run from within a repository that contains uncommitted changes, and also include a requirement that your tests pass before the push commences.
Usually it's when I do one thing, then start another, then realize that I really should push the old thing first.
So I add the old thing I did, commit, test (when I test. sometimes I'm bad and don't have real tests.) and push, leaving this half-finished method uncommitted.
I guess I really should just git stash.
C does not have nearly as many useful things built in as git.