Skip to content

Commit

Permalink
added init-templatedir example windows cmd/ps
Browse files Browse the repository at this point in the history
added example which uses windows environment variables instead of the ~
  • Loading branch information
chronoB authored and asottile committed Nov 30, 2020
1 parent b45a8d2 commit ec8e425
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions index.mako
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,18 @@ git config --global init.templateDir ~/.git-template
pre-commit init-templatedir ~/.git-template
```
For Windows cmd.exe use `%HOMEPATH%` instead of `~`:
```batch
pre-commit init-templatedir %HOMEPATH%\.git-template
```
For Windows PowerShell use `$HOME` instead of `~`:
```powershell
pre-commit init-templatedir $HOME\.git-template
```
Now whenever a repository is cloned or created, it will have the hooks set up
already!
Expand Down

0 comments on commit ec8e425

Please sign in to comment.