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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

29,187 views 26 12
Join discussion

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