diff --git a/lectures/revealjs/10-git-branching.adoc b/lectures/revealjs/10-git-branching.adoc index 25a1dcad20feac03f86c44f5e8a12a9ac6f5a0b9..314ec45c489cca54a43b58ba8f4b7530524f30df 100644 --- a/lectures/revealjs/10-git-branching.adoc +++ b/lectures/revealjs/10-git-branching.adoc @@ -60,7 +60,7 @@ IT1901 Fall 2023 - {LECTURE_NO} [background-color = "#124990"] [color = "#fff6d5"] -== Git Branching +== Conflicts == Conflicts (1) @@ -70,19 +70,27 @@ IT1901 Fall 2023 - {LECTURE_NO} == Conflicts (2) - Setup VSCode -- `git config merge.tool vimdiff` +- vscode as editor +** `git config --global core.editor 'code --wait --new-window'` +- vscode as diff tool +** `git config --global diff.tool vscode` +** `git config --global difftool.vscode.cmd 'code --wait --diff $LOCAL $REMOTE'` + +== Conflicts (3) - Setup VSCode + +- vscode as merge tool +** `git config --global merge.tool vscode` +** `git config --global mergetool.vscode.cmd 'code --wait $MERGED'` - `git config merge.conflictstyle diff3` - `git config mergetool.prompt false` -== Conflicts (3) - Solving +== Conflicts (4) - Solving - `git mergetool` -- `:wqa` save and exit from vi +- solve the conflict in the editor - `git commit -m "message"` - `git clean` remove file (might remove other untracked files) - - [background-color = "#124990"] [color = "#fff6d5"]