Git p4 alias on Windows

Because this information is apparently not available anywhere on the internet I’m going to write it here:

git config —global alias.p4 !‘“C:\Program Files (x86)\Git\bin\git-p4.py”’

Please note that it’s single quote, then double quote, and closes double quote, single quote

Or inside your .gitconfig this is what it should look like:

[alias]

p4 = !’C:\Program Files (x86)\Git\bin\git-p4.py’

This is with git 1.7.10.msysgit.1, on Windows 7 x64. YMMV on other configurations.