## git with Visual Studio Code Jan Kozubowski --- ## Install the `code` command ### (Only for Mac, already built-in on Windows) ![image](https://hackmd.io/_uploads/r10qWQ9_bx.png) [Source](https://code.visualstudio.com/docs/setup/mac) --- ## Set VSC as your default Git Editor For commit messages. 1. Set global config: ``` git config --global \ core.editor "code --wait" ``` 2. then run `git commit`. 3. Save the file and close it. --- <!-- .slide: style="font-size: 0.90em;" --> ## Make VSC a default merge conflict tool ``` git config --global merge.tool vscode git config --global mergetool.vscode.cmd 'code --wait $MERGED' #or git config --global mergetool.vscode.cmd \ 'code --wait --merge $REMOTE $LOCAL $BASE $MERGED' ``` --- ## Show hidden .git folder in VSC 1. Open the **workspace** setting ![image](https://hackmd.io/_uploads/S1iB8ls_be.png) 2. Delete .git from the list --- 3. You will see the .git folder ![image](https://hackmd.io/_uploads/Hye3Lejdbx.png) --- 4. It created a .vscode folder with workspace settings ![image](https://hackmd.io/_uploads/SJxYvgjOZe.png)
{"description":"image","title":"git with Visual Studio Code ","contributors":"[{\"id\":\"9b02b446-e66a-4b87-ad0b-21574e73f20f\",\"add\":1333,\"del\":194,\"latestUpdatedAt\":1771975605507}]"}
    36 views