$ mkdir ladder
$ cd ladder/
$ git init
Initialized empty Git repository in ~/ladder/.git/
$ git commit --allow-empty -m 0
[master (root-commit) 899c146] 0
$ git checkout -b branch
Switched to a new branch 'branch'
$ git commit --allow-empty -m 1
[branch 5646b01] 1
$ for i in {2..10}; do
> if [ `expr $i % 2` -eq 0 ]; then
> git checkout master
> git merge --no-ff -m `[ $i -eq 10 ] && echo ten || echo $i` branch
> else
> git checkout branch
> git merge --no-ff -m $i master
> fi
> done
Switched to branch 'master'
Already up-to-date!
Merge made by the 'recursive' strategy.
Switched to branch 'branch'
Already up-to-date!
Merge made by the 'recursive' strategy.
Switched to branch 'master'
Already up-to-date!
Merge made by the 'recursive' strategy.
Switched to branch 'branch'
Already up-to-date!
Merge made by the 'recursive' strategy.
Switched to branch 'master'
Already up-to-date!
Merge made by the 'recursive' strategy.
Switched to branch 'branch'
Already up-to-date!
Merge made by the 'recursive' strategy.
Switched to branch 'master'
Already up-to-date!
Merge made by the 'recursive' strategy.
Switched to branch 'branch'
Already up-to-date!
Merge made by the 'recursive' strategy.
Switched to branch 'master'
Already up-to-date!
Merge made by the 'recursive' strategy.
結果
届いた。