]> granicus.if.org Git - icinga2/commitdiff
Docs: Add Powershell Git integration for Windows dev environment 7376/head
authorMichael Friedrich <michael.friedrich@icinga.com>
Wed, 31 Jul 2019 11:27:24 +0000 (13:27 +0200)
committerMichael Friedrich <michael.friedrich@icinga.com>
Wed, 31 Jul 2019 11:27:24 +0000 (13:27 +0200)
doc/21-development.md
doc/images/development/windows_powershell_posh_git.png [new file with mode: 0644]

index f73041c4b28b0b73ab10b1fca6f87bcf859cbd2d..b668aab43028e7f8f8f0ea571a42ec3703d774f8 100644 (file)
@@ -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 (file)
index 0000000..48014a4
Binary files /dev/null and b/doc/images/development/windows_powershell_posh_git.png differ