4 ms·
Requiring tests to pass before a commit is allowed can be a negative experience as well. For instance if you're handing off a branch to someone else to take ove
by bluefirebrand 4y ago
Requiring tests to pass before a commit is allowed can be a negative experience as well. For instance if you're handing off a branch to someone else to take over work in progress because you're going on vacation.
Or if you just have the (good) habit of checking in your work in progress code frequently, or daily.
Or if you have several workstations you want to share code on.
Point is that commits should be frequent and requiring tests to pass before you can commit is guaranteed to make sure that commits are infrequent.
I prefer to put "tests must pass before PR can be merged", rather than before commits can be made.
It solves all of those issues.
- nordsieck 4y ago> I prefer to put "tests must pass before PR can be merged", rather than before commits can be made. I worded it poorly, but this is largely what I meant. Although I was trying to stick to commits on main/master for the repository of record since PRs are a github (and bitbucket?) thing, whereas pre-commit hooks are a git thing.