fiedl / git-three-way-merges-talk

Talk for the IceCube collaboration meeting spring 2021
1 stars 0 forks source link

Print git graph for earlier-history scenario #3

Open fiedl opened 3 years ago

fiedl commented 3 years ago

Bildschirmfoto 2021-03-14 um 22 28 08

[2021-03-14 22:25:29] fiedl@fiedl-mbp ~/code/git-import-history-test
▶ git init
▶ git branch -m main

▶ git commit --allow-empty -m "A baz"  # f5ba326
▶ git commit --allow-empty -m "B blah"
▶ git commit --allow-empty -m "C blub"

▶ git co --orphan earlier-history
▶ git commit --allow-empty -m "D foo"
▶ git commit --allow-empty -m "E bar"
▶ git commit --allow-empty -m "F baz"

▶ git co f5ba326
▶ git co -b temp
▶ git merge --allow-unrelated-histories --no-ff earlier-history -m "H merging F into temp"
▶ git merge --no-ff main -m "I merging main into temp"

▶ git co main
▶ git merge --no-ff temp -m "G import earlier history"

[2021-03-14 22:33:07] fiedl@fiedl-mbp ~/code/git-import-history-test main
▶ git graph
*   11d2886 (HEAD -> main) G import earlier history
|\
| *   25f295d (temp) I merging main into temp
| |\
| |/
|/|
* | 88d186f C blub
* | 1449115 B blah
| * 6360243 H merging F into temp
|/|
| * e3963db (earlier-history) F baz
| * 6502ae2 E bar
| * c94efc3 D foo
* f5ba326 A baz
fiedl commented 3 years ago

Bildschirmfoto 2021-03-14 um 22 35 39