Windows Terminal Git Bash

How to add Git Bash into Windows Terminal

Inside Windows Terminal, press CTRL+, to start editing “settings.json”

{
   "profiles": {
      "list": [
         {
            "guid": "{f9c3b687-50b7-4b13-b312-c28e955ed7d3}",
            "hidden": false,
            "name": "Git Bash",
            "commandline": "S:/app/Git/usr/bin/bash.exe -i -l",
            "startingDirectory": "W:/work",
            "icon": "S:/app/Git/mingw64/share/git/git-for-windows.ico",
            "snapOnInput": true,
            "closeOnExit": true,
            "colorScheme": "GitBash",
            "fontFace": "Consolas",
            "fontSize": 14
         }
      ]
   }
}

After this, add a custom color scheme named “GitBash”

"schemes": [
   {
      "name": "GitBash",
      "background": "#FFFFF0",
      "foreground": "#404040",
      "black": "#0C0C0C",
      "blue": "#6060ff",
      "brightBlack": "#767676",
      "brightBlue": "#3B78FF",
      "brightCyan": "#61D6D6",
      "brightGreen": "#16C60C",
      "brightPurple": "#B4009E",
      "brightRed": "#E74856",
      "brightWhite": "#F2F2F2",
      "brightYellow": "#F9F1A5",
      "cyan": "#3A96DD",
      "green": "#00a400",
      "purple": "#bf00bf",
      "red": "#bf0000",
      "white": "#ffffff",
      "yellow": "#bfbf00",
      "grey": "#bfbfbf"
   }
],

REFERENCES

https://stackoverflow.com/questions/56839307/adding-git-bash-to-the-new-windows-terminal

Windows 10 permissions

RunAs Administrator:

REM Backup permissions of WindowsApps
icacls "%ProgramFiles%\WindowsApps" /save WindowsApps.acl

REM change owner to copy directory (it's a LOT of files!!!)
takeown /F “C:\Program Files\WindowsApps” /A /R

robocopy "c:\Program Files" s:\C_ProgramFiles /COPYALL /MIR /LOG:robocopy.txt /ZB /DCOPY:T /V /TEE

REM restore permissions
icacls "%ProgramFiles%" /restore WindowsApps.acl
RunAs Administrator:

cd some_directory
icacls * /t /q /c /reset
takeown /R /F *
icacls * /t /grant Everyone:F
cd ..
REM List all symbolic links and directory junctions
DIR /AL /S C:\

Junctions vs Directory symbolic link

https://superuser.com/questions/343074/directory-junction-vs-directory-symbolic-link

icacls reference

Windows 10 reset NTFS permissions

RunAs Administrator:

cd some_directory
icacls * /t /q /c /reset
takeown /R /F *
icacls * /t /grant Everyone:F
cd ..
REM to save and restore permissions
icacls _directory_ /save _filename_
icacls _directory_ /restore _filename_


REM Backup permissions of WindowsApps
icacls "%ProgramFiles%\WindowsApps" /save WindowsApps.acl /t

REM restore permissions
icacls "%ProgramFiles%" /restore WindowsApps.acl

Reference: icacls reference