From 97be354e2b3d78b4c64ecb5376ee3699281bc372 Mon Sep 17 00:00:00 2001 From: Adrian Stoica <stoica@ntnu.no> Date: Mon, 25 Sep 2023 13:39:00 +0200 Subject: [PATCH] edit: update lecture 10 slides --- lectures/revealjs/10-git-branching.adoc | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lectures/revealjs/10-git-branching.adoc b/lectures/revealjs/10-git-branching.adoc index 25a1dca..314ec45 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"] -- GitLab