Submit Search
Upload
Git コンフリクト
•
Download as PPTX, PDF
•
1 like
•
1,009 views
Yoshi Watanabe
Follow
Gitでコンフリクトが起こる様子をグラフで示しながら説明しています。
Read less
Read more
Software
Report
Share
Report
Share
1 of 13
Download now
Recommended
5分で分かるgitのrefspec
5分で分かるgitのrefspec
ikdysfm
こわくない Git
こわくない Git
Kota Saito
Gitのコンフリクトの解決
Gitのコンフリクトの解決
sirojiba
Git フェッチ
Git フェッチ
Yoshi Watanabe
Binary search tree exact match - illustrated walkthrough
Binary search tree exact match - illustrated walkthrough
Yoshi Watanabe
演習におけるGitを使った開発手順
演習におけるGitを使った開発手順
sirojiba
SSH力をつけよう
SSH力をつけよう
(^-^) togakushi
Gitはじめの一歩
Gitはじめの一歩
Ayana Yokota
Recommended
5分で分かるgitのrefspec
5分で分かるgitのrefspec
ikdysfm
こわくない Git
こわくない Git
Kota Saito
Gitのコンフリクトの解決
Gitのコンフリクトの解決
sirojiba
Git フェッチ
Git フェッチ
Yoshi Watanabe
Binary search tree exact match - illustrated walkthrough
Binary search tree exact match - illustrated walkthrough
Yoshi Watanabe
演習におけるGitを使った開発手順
演習におけるGitを使った開発手順
sirojiba
SSH力をつけよう
SSH力をつけよう
(^-^) togakushi
Gitはじめの一歩
Gitはじめの一歩
Ayana Yokota
Create images with AI models.pptx
Create images with AI models.pptx
Yoshi Watanabe
Git リベース
Git リベース
Yoshi Watanabe
Find n th fibonacci iteratively - illustrated walkthrough
Find n th fibonacci iteratively - illustrated walkthrough
Yoshi Watanabe
Binary search: illustrated step-by-step walk through
Binary search: illustrated step-by-step walk through
Yoshi Watanabe
Quicksort: illustrated step-by-step walk through
Quicksort: illustrated step-by-step walk through
Yoshi Watanabe
Merge sort: illustrated step-by-step walk through
Merge sort: illustrated step-by-step walk through
Yoshi Watanabe
More Related Content
More from Yoshi Watanabe
Create images with AI models.pptx
Create images with AI models.pptx
Yoshi Watanabe
Git リベース
Git リベース
Yoshi Watanabe
Find n th fibonacci iteratively - illustrated walkthrough
Find n th fibonacci iteratively - illustrated walkthrough
Yoshi Watanabe
Binary search: illustrated step-by-step walk through
Binary search: illustrated step-by-step walk through
Yoshi Watanabe
Quicksort: illustrated step-by-step walk through
Quicksort: illustrated step-by-step walk through
Yoshi Watanabe
Merge sort: illustrated step-by-step walk through
Merge sort: illustrated step-by-step walk through
Yoshi Watanabe
More from Yoshi Watanabe
(6)
Create images with AI models.pptx
Create images with AI models.pptx
Git リベース
Git リベース
Find n th fibonacci iteratively - illustrated walkthrough
Find n th fibonacci iteratively - illustrated walkthrough
Binary search: illustrated step-by-step walk through
Binary search: illustrated step-by-step walk through
Quicksort: illustrated step-by-step walk through
Quicksort: illustrated step-by-step walk through
Merge sort: illustrated step-by-step walk through
Merge sort: illustrated step-by-step walk through
Git コンフリクト
1.
git コンフリクト グラフで視覚化してみよう x a
2.
x Alice Bob Remote x x git clone git clone あるところにAliceとBobという 開発者がいました。 二人はとあるレポジトリから ソースをCloneしました。
3.
x Alice Bob Remote x x AliceとBobはそれぞれ同じ ファイルの同じ行に変更を 加えました。
4.
x Alice Bob Remote x x b git add test.txt git
commit -m “Alice changed it” git add test.txt git commit -m “Bob changed it” a Aliceはローカルのレポジト リに変更をコミットしまし た。 Bobも同じようにはローカ ルのレポジトリに変更をコ ミットしました。
5.
x Alice Bob Remote x x b a a git push まず、Aliceが先に彼女のレ ポジトリを中央レポジトリ にプッシュしました。
6.
x Alice Bob Remote x x b a a git push 次に、Bobが彼のレポジト リを中央レポジトリにプッ シュしましたが・・・エ ラーになりました。
7.
x Alice Bob Remote x x b a a git pull Auto-merging test.txt CONFLICT
(content): Merge conflict in test.txt Automatic merge failed; fix conflicts and then commit the result. a エラーの内容: コンフリクトです。マージしよう と試みましたが出来ませんでした。 自分でなんとか直してください。 プッシュを断られたので、プルし ます。するとエラーが出ました。
8.
x Alice Bob Remote x x b a a a コンフリクトが発生した ファイルを開けるとこんな 感じでした。
9.
x Alice Bob Remote x x b a a a 仕方がないので、BobはAliceの変 更も反映するように書き直しまし た。 この作業を手動マージといいます。
10.
x Alice Bob Remote x x a a a git add test.txt git
commit -m “Alice and Bob changed it” b c Bobは手動でマージして変更した ファイルをまたコミットしました。 彼のレポジトリには Aliceの変更 Bobの変更 手動マージの変更 の三つのコミットが見えます。
11.
x Alice Bob Remote x x a a a b c b c git
push Bobが彼のレポジトリを中 央レポジトリにプッシュし ました。 エラーは出ませんでした。
12.
x Alice Bob Remote x x a a a b c b c git
pull b c ちなみに、Aliceが中央レポ ジトリの最新の状態をプル しました。 これで二人の作業が時系列 にそってきちんと保存され ました。
13.
xRemote a b
c x a b c それぞれのコミットのファ イルの状態は時系列にそっ て記録されています。
Download now