AtelierArith / intro2software_with_julia

計算物理春の学校ソフトウェア入門講義のスライド格納リポジトリ
https://atelierarith.github.io/intro2software_with_julia/
2 stars 7 forks source link

わざとGit のコンフリクトを起こす例をどこかに置いておく #7

Open terasakisatoshi opened 6 months ago

terasakisatoshi commented 6 months ago

コンフリクトの解消を VS Code で行う例を追記する

terasakisatoshi commented 6 months ago

ここにリポジトリのリンクを配置

https://github.com/terasakisatoshi/conflict_iyada

terasakisatoshi commented 6 months ago
$ git clone https://github.com/terasakisatoshi/conflict_iyada.git
$ cd conflict_iyada
$ bash demo.sh
$ cd sandbox
$ git merge branchB # コンフリクト発生
$ code . # ここで VS Code を開く
terasakisatoshi commented 6 months ago

心が落ち着くハーブティを飲む

image

サイドバーのブランチアイコンを押す

terasakisatoshi commented 6 months ago

otogi.txt をクリックする

image

コンフリクトが発生しているので解決する.

branchB での作業を全面的に支持するならば Accept Incoming Change をクリックする

image

両方の良さ(?)を取り込もうとする場合は Resolve Merge Editor ボタンをクリックする

手動で下記のように解決する

むかしむかし
あるところに
おじいさんとおばあさんがいました
物理学者がきました
どんぶらこ,どんぶらことハミルトニアンが流れてきました
物理学者はハミルトニアンを対角化ができて満足しました
おしまい
image

作業が完了したら Complete Merge ボタンを押す

最後に

image

を押す

完成!