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

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,924 views 1 5
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