Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Clean way to run archived commits

teacup April 29, 2015

This question is about Bitbucket, which I mainly use via SourceTree, so I don't know much about the git command line.

Occasionally I encounter regression bugs; to help fixing said regressions one strategy is to...

  • Guess the oldest commit which (putatively) does not exhibit the bug, 
  • Check out everything and run the code to ensure that it actually works (or do it all over again)
  • Diff the latest known good version with the current version and analyse.

As an attempt to do just this, I typically use the checkout button in SourceTree, which results in a detached head and doesn't feel very clean. Is there a better way to do this?

1 answer

1 accepted

1 vote
Answer accepted
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 29, 2015

Checking out commits and having the head detached is exactly the way to do this.

Improvement ideas:

  • Have a separate clone for the investigations, that way you can easily compare the full tree of the current version to the old one.
  • Take a look at Git Bisect. It might be useful to automate what you are doing.
teacup April 29, 2015

I already use separate clones although I do find it a bit cumbersome (but have no objections if it is the best known way to do it with bitbucket and sourcetree...). "Easily compare" - by which you mean easily run both versions side by side? (Or you meant "compare" more literally?)

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 29, 2015

I mean, diff the whole file tree, compile+run both or whatever comparison you need. :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events