From: Michael Friedrich Date: Wed, 31 Jul 2019 11:27:24 +0000 (+0200) Subject: Docs: Add Powershell Git integration for Windows dev environment X-Git-Tag: v2.11.0~1^2~58^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=308c32376a5d4b306a1974776d45cf3805d8f2ed;p=icinga2 Docs: Add Powershell Git integration for Windows dev environment --- diff --git a/doc/21-development.md b/doc/21-development.md index f73041c4b..b668aab43 100644 --- a/doc/21-development.md +++ b/doc/21-development.md @@ -1568,8 +1568,47 @@ Open an administrative command prompt (Win key, type “cmd”, right-click and @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin ``` -In case you are used to `vim`, start a new administrative Powershell and run `choco install -y vim`. +#### Git, Posh and Vim +In case you are used to `vim`, start a new administrative Powershell: + +``` +choco install -y vim +``` + +The same applies for Git integration in Powershell: + +``` +choco install -y poshgit +``` + +![Powershell Posh Git](images/development/windows_powershell_posh_git.png) + +In order to fix the colors for commands like `git status` or `git diff`, +edit `$HOME/.gitconfig` in your Powershell and add the following lines: + +``` +vim $HOME/.gitconfig + +[color "status"] + changed = cyan bold + untracked = yellow bold + added = green bold + branch = cyan bold + unmerged = red bold + +[color "diff"] + frag = cyan + new = green bold + commit = yellow + old = red white + +[color "branch"] + current = yellow reverse + local = yellow + remote = green bold + remote = red bold +``` #### Visual Studio @@ -1582,8 +1621,8 @@ You need a free Microsoft account to download and also store your preferences. Install the following Workloads: -* C++ Desktop -* .NET Desktop +* C++ Desktop Development (icinga2.exe) +* .NET Desktop Development (Agent Setup Wizard in C#) In addition also choose these individual components on Visual Studio 2017: diff --git a/doc/images/development/windows_powershell_posh_git.png b/doc/images/development/windows_powershell_posh_git.png new file mode 100644 index 000000000..48014a4c5 Binary files /dev/null and b/doc/images/development/windows_powershell_posh_git.png differ