3 ms·
What am I missing? If commit is a possible action, then we have a unit of code not yet in the repo. So if that is the case, won't the revert be reverting a prev
by city41 8y ago
What am I missing? If commit is a possible action, then we have a unit of code not yet in the repo. So if that is the case, won't the revert be reverting a previous, unrelated commit? If we can't commit unless the tests pass, then why would we ever revert?
I believe what I'm missing is taking the word `revert` too literally. I suspect it's actually `test && commit || checkout .` essentially.
- admax88q 8y agoYou're thinking in terms of git. Most version systems before used revert to mean undo local changes, not apply the reverse of a commit.
- Tyr42 8y agoIt's not git, I think revert means "revert to state at last commit"
- derefr 8y agoIt's: ./test.sh && (git add . && git commit -m "auto") || (git reset --hard HEAD)