It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I search by commit hash

When using git bisect for example, we always have git hash as result. It would be nice to be able to filter or search commit by their hash instead of their commit message.

6 answers

1 accepted

18 votes
Answer accepted

This is in the log view rather than the search view because it's about jumping to the right commit. Use the Jump to: option in the top right of the log view and select "Commit...", then type in a full or partial SHA.

Ok thanks. Not very discoverable though...

Like eestradalucero likes this

I spent 5 minutes wondering how to do this and then ended up here. It might help if that dropdown option said "Commit hash" instead of just "Commit".

Is there a keyboard shortcut to bring up the jump to commit dialog?

I agreed with aymeric. You should duplicate this option in the Search menu (CTRL+3).

Worst location ever.

Like Stu Wood likes this

this is not obvious at all. i raged for 30 minutes until i found it

 

Pretty dumb. The point of a hash is that it's quick and easy to find something by unique ID. Forcing user to scroll through ALL POSSIBLE HASHES EVER is a lazy UI. Furthermore, this IS now available in the search view.

屏幕快照 2016-08-15 下午3.55.52.png

What is the log view? How do I get to it in the web interface`?

Like Maxwell Pietsch likes this

I believe the posters that are referring to "search view" and "log view" are talking about available options in the SourceTree tool provided by Atlassian; not the Bitbucket Web UI.  As best as I can tell, at least in Bitbucket Server Web UI... there doesn't appear to be any way to search by commit hash, other than to scroll to it... which isn't very helpful.

Like # people like this

If you're using the Bitbucket Web UI, you can navigate to any commit nearby and edit the url with your hash like so:

http://stash/projects/yourProject/repos/yourBranch/commits/placeYourHashHere

That will take you directly to your commit.

Like robert66427 likes this

For people who are stuck in a version before 5.8 which fixed that issue there is a workaround for the commit hash

Just go inside Bitbucket Web UI to the commits on the left menu then type a slash inside the adress field of your browser and enter the hash.

it will immediately display the commit 

BEST RESPONSE EVER!!!

Urbietus I'm New Here Wednesday

CLAP! CLAP! CLAP!

Thank you!!

We have a lot of tags, which means that the "Jump to:" dropdown can take a few seconds to appear, when all I ever want is to search by hash/tag/branch/bookmark. These things are listed in the left hand pane of the log view, so listing them here in the dropdown is redundant. It'd be great if this could be improved. Adding a keyboard shortcut for searching by commit identifier seems to be the easiest quick fix.

  1. Go to "Search view" (cmd-3)
  2. change "Search" select menu to "Commit SHA"
  3. type the commit hash into the search bar

 

what is cmd-3?

It might help if that dropdown option said "Commit hash" instead of just "Commit".

Well, currently in the latest version this option does nothing... cool.

You have to wait. It's slow and does not show loading indicator.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

Share your software development horror stories!

Hey Community! I work on the Bitbucket product marketing team. With Halloween approaching, we wanted to discuss a topic tailor-made for October: development horror stories. Whether it was a lurk...

590 views 6 2
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you