GitDrive v0.1.0
Navigate Git branches as a PowerShell PSDrive.
Install
Install-Module GitDriveQuick Start
cd C:\MyRepo
gcd # mount and navigate to current branch
dir # list branches + commits
cd feature\login # enter child branch
Get-Content .\abc1234 # view commit diff
ii .\feature\login # checkout branchFeatures
- Branch navigation —
cd/lsto browse branches without touching the working tree - Commit history — each branch shows its unique commits with SHA, date, author, message
- Ahead count — see how many commits each branch is ahead of its parent
- Current branch marker —
*marks the checked-out branch - Refs column — shows branches, tags, and
HEAD ->pointing to each commit - Checkout —
Invoke-Item(orii) on a branch performsgit checkout - Branch operations —
New-Item,Remove-Item,Rename-Itemfor branch management - Diff viewer —
Get-Contenton a commit shows the full diff/patch - Namespace folders — branches with
/(e.g.,feature/login) grouped naturally - Pipeline analysis — filter, sort, and compare branches as PowerShell objects
Pipeline Examples
# Find merged branches
Get-ChildItem -Recurse | Where-Object { $_.IsBranch -and $_.Ahead -eq 0 }
# Find stale branches (older than 3 months)
Get-ChildItem -Recurse | Where-Object { $_.IsBranch -and $_.Date -lt (Get-Date).AddMonths(-3) }
# Branch health summary
$b = Get-ChildItem -Recurse | Where-Object IsBranch
[PSCustomObject]@{ Total = $b.Count; Merged = ($b | ? Ahead -eq 0).Count }Requirements
- PowerShell 7.4+
- Windows (x64 or ARM64)