Loading parent story...
Loading comment...
Loading parent story...
Loading comment...
A feature I’m still missing is to bisect using a new test. That is, I have discovered a bug in the program that there is no test for, so I author a failing test. Now I want to find out when this failure occurred but I can’t bisect because even the previous commit is green as the test didn’t exist. It’s possible to work around by placing the test outside the repo root and bisecting with a script that “authors” the test (e.g copies the file) at each step, but it’s cumbersome and feels like something that could be possible to add to the bisect command, e.g an option to merge a commit (the new test) before testing each step of the bisect.
1. Create new test (e.g. "spec/reproduce-bug_spec.rb")
2. Ignore it locally: `echo "spec/reproduce_bug_spec.rb" >> .git/info/exclude`
3. Run bisect (something like: `git bisect run rspec spec/reproduce-bug_spec.rb`)
If running the test gets more complex (e.g. installing dependencies as they might change travelling through history), I usually create a wrapper script (and ignore it) to bisect-run-it.
Most of my comments end up being "suggestions", but then when I put a [blocking] on it, it clearly communicates that I think this should be fixed before merging in.
Conventional commits: https://www.conventionalcommits.org/en/v1.0.0/
And obviously, it also "ignores" the .gitignore itself because it matches "*", while still taking it into account, which is what I need.
git will take 3 files into consideration for "ignoring" files:
> $XDG_CONFIG_HOME/git/ignore, $GIT_DIR/info/exclude, .gitignore
How I use them:
* ~/.gitignore: stuff I want to ignore everywhere (`/myNotes`, `.DS_STORE`, ...)
* <project>/.gitignore: stuff that should be ignore for this projects and shared with others
* <project>/.git/info/exclude; stuff for this project that only I want to ignore
** this is also super useful in combination with `git-bisect`
Loading parent story...
Loading comment...