feat: setup merge and diff for git
This commit is contained in:
13
install.ps1
13
install.ps1
@@ -636,8 +636,19 @@ if ($userChoice -ne "CloneOnly") {
|
|||||||
-MinVersion "2.23" `
|
-MinVersion "2.23" `
|
||||||
-AdditionalArgs "-e"
|
-AdditionalArgs "-e"
|
||||||
|
|
||||||
Write-Host "Setting the init.defaultBranch to be \"main\""
|
Write-Host " Setting the init.defaultBranch to be 'main'"
|
||||||
git config --global init.defaultBranch main
|
git config --global init.defaultBranch main
|
||||||
|
|
||||||
|
Write-Host " Setting the default editor to code, to handle merge messages"
|
||||||
|
git config --global core.editor "code --wait"
|
||||||
|
|
||||||
|
Write-Host " Setting vscode at the default code editor for merge conflicts"
|
||||||
|
git config --global merge.tool vscode
|
||||||
|
git config --global mergetool.vscode.cmd 'code --wait --merge $REMOTE $LOCAL $BASE $MERGED'
|
||||||
|
|
||||||
|
Write-Host " Setting vscode as the default code editor for diffs"
|
||||||
|
git config --global diff.tool vscode
|
||||||
|
git config --global difftool.vscode.cmd 'code --wait --diff $LOCAL $REMOTE'
|
||||||
|
|
||||||
# Verify Git version specifically
|
# Verify Git version specifically
|
||||||
if ($results.Git) {
|
if ($results.Git) {
|
||||||
|
|||||||
Reference in New Issue
Block a user