From 680d38a655e72c1ceac1eedcf4d3272ba4417584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Petersen?= Date: Mon, 15 Jul 2019 23:04:46 +0200 Subject: [PATCH] No Issue: Add pre-push hook instruction for PowerShell (#4018) The mklink command is not available in PowerShell, making the previous documentation for pre-push hooks on Windows incomplete. --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 36ddb27c5..0732e0a23 100644 --- a/README.md +++ b/README.md @@ -51,10 +51,14 @@ To add it on Mac/Linux, run this command from the project root: ```sh ln -s ../../config/pre-push-recommended.sh .git/hooks/pre-push ``` -or for Windows run this command with administrative privileges: +or for Windows run this command using the Command Prompt with administrative privileges: ```sh mklink .git\hooks\pre-push ..\..\config\pre-push-recommended.sh ``` +or using PowerShell: +```sh +New-Item -ItemType SymbolicLink -Path .git\hooks\pre-push -Value (Resolve-Path config\pre-push-recommended.sh) +``` To push without running the pre-push hook (e.g. doc updates): ```sh