How to search by filename?

I'd like to search by filename in my branches. Today is possible the search by message commits, file change and actors, but is not possible by filename. Someone know tell if it is possible make this search? I'm using the SourceTree in version

4 answers

1 accepted

You are correct, it's not possible to use the search tab to do what you want.

There is a two-step process that can get you there, but only works for one file at a time:

1) Find the file you want in the "File Status" tab using the search bar on that tab:

image2016-12-2 8:5:50.png

2) Right-click the file, and select "Log Selected...".


My difficulty is exactly this, find the file after commit, by tab "Search". Ideal would be have also a search input in tab "Search" for find files. I hope whitch implemented in future versions. Thank you @Seth.

Are you wanting to search for a list of commits where a certain file has been changed, or just find the file itself?

I want to know what the changes were in the searched file. Like this when is searched by actor the changes are showed. Sorry for my English.

Not possible. What I do is go to the command line and save the entire git log to a text file. I can then open the text file in a text editor and use the find feature there. The great thing about this is the log will also contain the file names of files that were deleted.

git log --name-status --decorate > _commit_dump.txt

Text file will contain stuff like this:

commit 30183ea616eeb2d6cc442f90e5d638fd2c07c372
Author: thinsoldier <>
Date:   Sat Jul 2 21:47:15 2016 -0600

    Refactor "wifi security" page code to have the main code run only after the device list has been fetched, and move some styling out of css and into stylesheet, and add a column to the device table that will be used later to show status

M    global.css
M    mac-address-list.php
M    wifi-security.js
A    migrate/017-add-device-status.sql
D    iframe-test.html

M = file was modified

A = file was added

D = file was deleted

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
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

792 views 0 4
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