Some useful Git info
Winget Custom Install
installing Git with EnabledSymLinks and windows terminal intergratio
1winget install Git.Git --custom "/o:EnableSymlinks=Enabled /Components=ext,ext\shellhere,ext\guihere,gitlfs,assoc,assoc_sh,windowsterminal,scalar"
Symbolic Links and Git on Windows
Symbolic Links and Git on Windows Create the Symbolic link using gitbash and NOT Windows PowerShell
1#Set global variable to use symlinks
2git config --global core.symlinks true
3
4#check the config is set
5git config --show-scope --show-origin core.symlinks
6
7#clone remote repo
8cd /
9git clone https://github.com/xxxx/xxxx.git
10
11#create symbolic link
12cd xxxx
13ln -s '/c/Users/xxx/Documents/WindowsPowerShell/' WindowsPowerShell
14
15#New symbolic link isn't under version control
16git ls-files
17#Add symbolic link folder to version control
18git add WindowsPowerShell/
19#The new folder is under version control
20git ls-files
21#Local commit of the changes
22git commit -m "Finally adding the Windows PowerShell folder in correctly"
23#Push changes to remote
24git push
Git context menu items missing
Hammer Option
- Uninstall git
1winget uninstall git
- Open regedit as an admin
- Go to ‘HKEY_CURRENT_USER/Software/Classes/Directory/Background’
- Delete key ‘shell’
- Open regedit
- CTRL+F - Look at Keys only and uncheck Match Whole String Only - git_
- Delete key
- F3 to find next and delete key again and repeat
- Reinstall git
1winget install git
- Restart Explorer
Less Hammer
- Open regedit as an admin
- CTRL+F - Look at Keys only and uncheck Match Whole String Only - git_
- point items to correct place example below
1[HKEY_CLASSES_ROOT\Directory\background\shell\git_gui]
2@="Open Git &GUI here"
3"Icon"="C:\\Program Files\\Git\\cmd\\git-gui.exe"
4
5[HKEY_CLASSES_ROOT\Directory\background\shell\git_gui\command]
6@="\"C:\\Program Files\\Git\\cmd\\git-gui.exe\" \"--working-dir\" \"%v.\""
7
8[HKEY_CLASSES_ROOT\Directory\background\shell\git_shell]
9@="Open Git Ba&sh here"
10"Icon"="C:\\Program Files\\Git\\git-bash.exe"
11
12[HKEY_CLASSES_ROOT\Directory\background\shell\git_shell\command]
13@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""