- Renamed submodule path:
modules/GitAliases.Extras->modules/git-aliases-extra - Renamed migration script:
tools/migrate-gitaliases-extras.ps1->tools/migrate-git-aliases-extra.ps1 - Existing local git hooks may still point to the old path and fail
Migration steps:
git submodule sync --recursive
git submodule update --init --recursive
.\tools\install-hooks.ps1Put this in $PROFILE.CurrentUserAllHosts:
# Microsoft.PowerShell_profile.ps1 (CurrentUserAllHosts)
$dot = Join-Path $HOME 'dotfiles\profile.ps1'
if (Test-Path $dot) { . $dot }Run both lint and tests:
.\tools\ci.ps1Run only lint:
.\tools\ci.ps1 -LintOnlyRun only tests:
.\tools\ci.ps1 -TestOnlyInstall local git hooks:
.\tools\install-hooks.ps1Installed hooks:
pre-commit(lightweight no-op)commit-msg(runstools/ci.ps1)- hook logic is sourced from
modules/git-aliases-extra/tools/hooks/*to avoid duplication
Checks are skipped when:
- commit message contains
[skip precommit hook]or[skip pch] - there are no working tree changes (for example,
git commit --allow-empty ...)
Recommended approach: keep this as dotfiles repo and move modules/git-aliases-extra to its own repository, then consume it via git submodule at the same path.
Safe migration flow:
- Run a dry run:
.\tools\migrate-git-aliases-extra.ps1 -SubmoduleUrl 'git@github.com:<you>/git-aliases-extra.git' -SubmoduleBranch main -PushSplit- Apply the migration:
.\tools\migrate-git-aliases-extra.ps1 -SubmoduleUrl 'git@github.com:<you>/git-aliases-extra.git' -SubmoduleBranch main -PushSplit -Apply- Commit resulting changes in this repo (
.gitmodules+ submodule pointer).
Notes:
bootstrap.ps1now initializes submodules automatically if.gitmodulesexists.profile.ps1warns with the exactgit submodule update --init --recursivecommand if submodules were not initialized.
P.S. You can also install just git-aliases-extra without dotfiles as standalone powershell package
PSScriptAnalyzerlinting withPSScriptAnalyzerSettings.psd1Pestertests intests\plusmodules\git-aliases-extra\tests\- GitHub Actions matrix on:
- Windows PowerShell 5.1
- PowerShell 7
WTFPL. See LICENSE.