Clean way to run archived commits

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

This widget could not be displayed.

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.

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?)

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
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,354 views 8 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you