mirror of
https://github.com/sahinakkaya/til.git
synced 2024-11-22 00:29:37 +01:00
Add a note about filtering logs
This commit is contained in:
parent
5787b4cfe5
commit
761f8f16e7
@ -18,3 +18,11 @@ The --author option allows you to filter on a specific author
|
||||
```
|
||||
git log --author="Asocia"
|
||||
```
|
||||
|
||||
- Getting the logs for a specific string
|
||||
|
||||
|
||||
Another really helpful filter is the -S option (colloquially referred to as Git’s “pickaxe” option), which takes a string and shows only those commits that changed the number of occurrences of that string. For instance, if you wanted to find the last commit that added or removed a reference to a specific function, you could call:
|
||||
```
|
||||
git log -S function_name
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user