1

How do I run git-grep in SourceTree?

I can see the ability to search commit messages, commit SHAs, branches, file changes, and users, under Workspace > Search, but not content within the workspace itself.

Searching SourceTree Help from the Help menu had no matches for "grep", and Atlassian Answers for SourceTree doesn't seem to have any way to search for grep questions tagged with sourcetree: grep [sourcetree] only got one hit.

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338

1 Answers1

1

I just checked with the latest SourceTree 1.8.3 (and its release notes)

This feature doesn't seem to be available for now.
That means the command-line remains the best option for now.

Of course, you could add a "custom action"... if only custom actions in SourceTree accepted input from the user.
2016: Alas, SRCTREE-942 is still opened 3 years later.

custom action

As noted by the OP Andrew Grimm, SRCTREE-942 was closed in 2019.
I just tested (Jan. 2023) with Sourcetree 3.4.10 and... it is still not supported: no prompt available.There is no error using $1, but searching '$1' itself is not useful.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • SRC-TREE-942 was since fixed in 2019. I can't verify this as I no longer use SourceTree. – Andrew Grimm Jan 11 '23 at 23:16
  • 1
    @AndrewGrimm Thank you for the heads-up. I just tested with the latest Sourcetree and... it is still not supported. – VonC Jan 12 '23 at 06:40
  • Sorry, I made a mistake. I said it was "Fixed" but it merely has a Status of Closed and a resolution of Unresolved. – Andrew Grimm Jan 12 '23 at 10:28