Skip to content

v0.1.0 - Initial Release

Latest

Choose a tag to compare

@yotsuda yotsuda released this 04 Apr 13:18
· 1 commit to master since this release

GitDrive v0.1.0

Navigate Git branches as a PowerShell PSDrive.

Install

Install-Module GitDrive

Quick 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 branch

Features

  • Branch navigationcd/ls to 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
  • CheckoutInvoke-Item (or ii) on a branch performs git checkout
  • Branch operationsNew-Item, Remove-Item, Rename-Item for branch management
  • Diff viewerGet-Content on 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)