GitEasy

« All commands

Search-History Search saved-point history for a specific text.

Read-Only GitEasy v1.5.3

Description

Search-History finds every saved point in the active project that added or removed the text you give it. Useful for forensic questions like "when did the connection string change?" or "when was that function name dropped?"

By default, Search-History returns structured objects (one per matching saved point), so you can pipe and filter. With -Patch, it includes the actual change text alongside each result.

Recipes

Recipe 1
EXAMPLE 1
Search-History -Pattern 'DROP TABLE'
Recipe 2
EXAMPLE 2
Search-History -Pattern 'connection string' -Count 10
Recipe 3
EXAMPLE 3
Search-History -Pattern 'old-function-name' -Patch

Notes

Search-History looks at every saved point in history, not just recent ones, so it can be slow on very large projects. Use -Count to limit how many results to return.

Parameters

-Pattern required String
The text to search for in the saved-point history. Plain text, not a regular expression.
-Count optional Int32
The maximum number of matching saved points to return. Defaults to 50. Validated to the range 1-500.
-Patch optional SwitchParameter
Include the change text (the lines that were added or removed) for each matching saved point.

Was this page helpful? Report an issue or suggest an improvement →