Find the first broken commit without having to learn git bisect
Find the first broken commit without having to learn git bisect.
HEAD~1
, HEAD~2
, HEAD~4
, HEAD~8
, ...)gem install git-autobisect
or as standalone binary (needs any ruby)
curl -sL https://github.com/grosser/git-autobisect/releases/download/v0.4.3/git-autobisect > /usr/local/bin/git-autobisect && \
chmod +x /usr/local/bin/git-autobisect && \
git-autobisect --version
cd your project
# run a test that has a non-0 exit status
git-autobisect 'rspec spec/models/user_spec.rb'
... grab a coffee ...
---> The first bad commit is a4328fa
git show
-m, --max N Inspect commits between HEAD..HEAD~<max>
-s, --start N Use N (instead of 1) as initial step and keep multiplying by 2
--step N Use N as step (instead of multiplying by 2
--no-bundle Do not bundle even if a Gemfile exists
[ ! -f spec/my_spec.rb ] || rspec spec/my_spec.rb
bundle check || bundle
injectionbundle && bundle exec rake
bundle exec
Michael Grosser [email protected] License: MIT