Git-Achievements in PowerShell

Reading through Jason’s post on using Git-Achievements with msysGit, I couldn’t help but get it working with PowerShell. The result is a single PowerShell script added to my Git-Achievements repository, tagged here on the off chance I decided to upload my achievements.

To install posh-git-achievements…

  1. Fork my repository on GitHub (or if you have an existing repository, add me as a remote and pull)
  2. Clone your fork of the repository (into C:\Git\git-achievements, for this example)
  3. Open your PowerShell profile and add the following:
    Set-Alias git C:\Git\git-achievements\git-achievements.ps1
  4. “dot source” your profile to reload it in your current session (or just start a new session):
    . $PROFILE
  5. Check the install:
    git achievements --help

If all goes according to plan, this should unlock your first achievement.

Note that this will pass every git call through a few extra layers, including calls made for the posh-git prompt. But if you can tolerate the performance hit, it’s a rather fun way to expand your working knowledge of Git. Enjoy!

Advertisement
Posted in Git, PowerShell. Tags: . Comments Off on Git-Achievements in PowerShell