fiedl / git-three-way-merges-talk Goto Github PK
View Code? Open in Web Editor NEWTalk for the IceCube collaboration meeting spring 2021
Talk for the IceCube collaboration meeting spring 2021
[2021-03-14 13:39:43] fiedl@fiedl-mbp ~/code/git-2-way-merge-test
▶ git init
[2021-03-14 13:39:45] fiedl@fiedl-mbp ~/code/git-2-way-merge-test master
▶ git co --orphan foo
▶ cat test
B
C
[2021-03-14 13:42:26] fiedl@fiedl-mbp ~/code/git-2-way-merge-test foo ⚡
▶ git commit
[2021-03-14 13:42:46] fiedl@fiedl-mbp ~/code/git-2-way-merge-test foo
▶ git co --orphan bar
▶ cat test
A
B
C
D
foo
into bar
[2021-03-14 13:44:53] fiedl@fiedl-mbp ~/code/git-2-way-merge-test bar
▶ git merge --allow-unrelated-histories foo
bar
into foo
[2021-03-14 13:53:11] fiedl@fiedl-mbp ~/code/git-2-way-merge-test foo
▶ git merge --allow-unrelated-histories bar
Both merges create a merge conflict between BC
and ABCD
.
<<<<<<<
B
C
|||||||
=======
A
B
C
D
>>>>>>>
[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
[2021-03-14 14:08:12] fiedl@fiedl-mbp ~/code/git-3-way-merge-test
▶ git init
[2021-03-14 14:09:28] fiedl@fiedl-mbp ~/code/git-3-way-merge-test main
▶ cat test
A
B
C
[2021-03-14 14:09:23] fiedl@fiedl-mbp ~/code/git-3-way-merge-test main ⚡
▶ git commit -m "commit ABC on main" # 4b69425
[2021-03-14 14:10:26] fiedl@fiedl-mbp ~/code/git-3-way-merge-test main ⚡
▶ cat test
A
B
C
D
[2021-03-14 14:10:38] fiedl@fiedl-mbp ~/code/git-3-way-merge-test main ⚡
▶ git commit -m "commit ABCD on main"
[2021-03-14 14:10:58] fiedl@fiedl-mbp ~/code/git-3-way-merge-test main
▶ git co 4b69425
▶ git co -b foo
▶ cat test
B
C
[2021-03-14 14:12:02] fiedl@fiedl-mbp ~/code/git-3-way-merge-test foo ⚡
▶ git commit -m "commit BC on foo"
foo
into main
with base 4b69425
[2021-03-14 14:12:45] fiedl@fiedl-mbp ~/code/git-3-way-merge-test main
▶ git merge-base main foo
4b694250ad510bb37a7676334258df85c1e8f8a0
[2021-03-14 14:12:54] fiedl@fiedl-mbp ~/code/git-3-way-merge-test main
▶ git merge foo
automatischer Merge von test
Merge made by the 'recursive' strategy.
[2021-03-14 14:13:09] fiedl@fiedl-mbp ~/code/git-3-way-merge-test main
▶ cat test
B
C
D
Works as expected. ✅
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.