Skip to content

PhysShell/dotfiles

Repository files navigation

dotfiles

Profile installation

Put this in $PROFILE.CurrentUserAllHosts:

# Microsoft.PowerShell_profile.ps1 (CurrentUserAllHosts)
$dot = Join-Path $HOME 'dotfiles\profile.ps1'
if (Test-Path $dot) { . $dot }

Quality checks

Run both lint and tests:

.\tools\ci.ps1

Run only lint:

.\tools\ci.ps1 -LintOnly

Run only tests:

.\tools\ci.ps1 -TestOnly

Commit hooks

Install local git hooks:

.\tools\install-hooks.ps1

Installed hooks:

  • pre-commit (lightweight no-op)
  • commit-msg (runs tools/ci.ps1)
  • hook logic is sourced from modules/GitAliases.Extras/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 ...)

Extract GitAliases.Extras

Recommended approach: keep this as dotfiles repo and move modules/GitAliases.Extras to its own repository, then consume it via git submodule at the same path.

Safe migration flow:

  1. Run a dry run:
.\tools\migrate-gitaliases-extras.ps1 -SubmoduleUrl 'git@github.com:<you>/GitAliases.Extras.git' -SubmoduleBranch main -PushSplit
  1. Apply the migration:
.\tools\migrate-gitaliases-extras.ps1 -SubmoduleUrl 'git@github.com:<you>/GitAliases.Extras.git' -SubmoduleBranch main -PushSplit -Apply
  1. Commit resulting changes in this repo (.gitmodules + submodule pointer).

Notes:

  • bootstrap.ps1 now initializes submodules automatically if .gitmodules exists.
  • profile.ps1 warns with the exact git submodule update --init --recursive command if submodules were not initialized.

P.S. You can also install just GitAliases.Extras without dotfiles as standalone powershell package

What CI checks

  • PSScriptAnalyzer linting with PSScriptAnalyzerSettings.psd1
  • Pester tests in tests\ plus modules\GitAliases.Extras\tests\
  • GitHub Actions matrix on:
    • Windows PowerShell 5.1
    • PowerShell 7

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published