Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 1.04 KB

Git.Log-Extension.md

File metadata and controls

66 lines (52 loc) · 1.04 KB

Extensions/Git.Log.UGit.Extension.ps1

Synopsis

Log Extension


Description

Outputs git log as objects.


Examples

Get all logs

git log |
    # until the first merged pull request
    Where-Object -Not Merged

Get a single log entry

git log -n 1 |
    # and see what the log object can do.
    Get-Member

Get all logs

git log |
    # Group them by the author
    Group-Object GitUserEmail -NoElement |
    # sort them by count
    Sort-Object Count -Descending

Get all logs

git log |
    # Group them by day of week
    Group-Object { $_.CommitDate.DayOfWeek } -NoElement

Get all logs

git log |
    # where there is a pull request number
    Where-Object PullRequestNumber |
    # pick out the PullRequestNumber and CommitDate
    Select PullRequestNumber, CommitDate

EXAMPLE 6

git log --merges

Syntax

Extensions/Git.Log.UGit.Extension.ps1 [<CommonParameters>]