## git with Visual Studio Code
Jan Kozubowski
---
## Install the `code` command
### (Only for Mac, already built-in on Windows)

[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

2. Delete .git from the list
---
3. You will see the .git folder

---
4. It created a .vscode folder with workspace settings

{"description":"image","title":"git with Visual Studio Code ","contributors":"[{\"id\":\"9b02b446-e66a-4b87-ad0b-21574e73f20f\",\"add\":1333,\"del\":194,\"latestUpdatedAt\":1771975605507}]"}