하늘까지 배달 merge 사다리
$ 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.
결과
도착했다.
Reference
이 문제에 관하여(하늘까지 배달 merge 사다리), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/Bakudankun/items/925038c332543812c104텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)