[email protected]: ~ $ git ls-remote | tail -n 2
be74d8368acd4815b6863daded46a232944e0d84 refs/tags/v0.8.6
9181306caa304b4cf8b3764b1446c0c4006833d8 refs/tags/v0.8.7
둘째, 자식 저장소가 생성됩니다 :
[email protected]: ~/test (master) $ git subtree add --squash --prefix=weave https://github.com/hesco/hesco-weave.git v0.8.6
git fetch https://github.com/hesco/hesco-weave.git v0.8.6
warning: no common commits
remote: Counting objects: 543, done.
remote: Compressing objects: 100% (193/193), done.
remote: Total 543 (delta 306), reused 536 (delta 306), pack-reused 0
Receiving objects: 100% (543/543), 93.19 KiB | 0 bytes/s, done.
Resolving deltas: 100% (306/306), done.
From https://github.com/hesco/hesco-weave
* tag v0.8.6 -> FETCH_HEAD
Added dir 'weave'
추적 정보 :
[email protected]: ~ $ mkdir -p ~/test
[email protected]: ~ $ cd ~/test
[email protected]: ~/test $ git init
Initialized empty Git repository in ~/test/.git/
[email protected]: ~/test $ touch README.md
[email protected]: ~/test $ git add .
[email protected]: ~/test $ git commit -m "README.md added"
[master (root-commit) b1ac90e] README.md added
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
[email protected]: ~/test (master) $ git log
commit 19c0570a414c4fd1635444b7a937dfc41c93a847
Author: Me <[email protected]>
Date: Wed Jun 14 13:02:05 2017 +0200
README.md added
셋째는 Github에서의 저장소의 v0.8.6 태그는 하위 트리로 생성 된 저장소에 추가됩니다
[email protected]: ~/test (master) $ git log
commit e5dc318c4437cd22ebddb9e82e8c419aef72a781
Merge: b1ac90e 19c0570
Author: me <[email protected]>
Date: Wed Jun 14 13:02:25 2017 +0200
Merge commit '19c0570a414c4fd1635444b7a937dfc41c93a847' as 'weave'
commit 19c0570a414c4fd1635444b7a937dfc41c93a847
Author: me <[email protected]>
Date: Wed Jun 14 13:02:25 2017 +0200
Squashed 'weave/' content from commit be74d83
git-subtree-dir: weave
git-subtree-split: be74d8368acd4815b6863daded46a232944e0d84
commit b1ac90efbfe5978bac52984c29e6ec7904ed9a75
Author: me <[email protected]>
Date: Wed Jun 14 13:02:05 2017 +0200
README.md added
마지막으로, 최신 태그 v0.8이 포함 된 위브 하위 트리.7 git subtree pull
로 병합 :
[email protected]: ~/test (master) $ git subtree pull --squash --prefix=weave https://github.com/hesco/hesco-weave.git v0.8.7
warning: no common commits
remote: Counting objects: 548, done.
remote: Compressing objects: 100% (195/195), done.
remote: Total 548 (delta 311), reused 541 (delta 309), pack-reused 0
Receiving objects: 100% (548/548), 90.50 KiB | 0 bytes/s, done.
Resolving deltas: 100% (311/311), done.
From https://github.com/hesco/hesco-weave
* tag v0.8.7 -> FETCH_HEAD
Merge made by the 'recursive' strategy.
weave/Changelog | 1 +
weave/Modulefile | 2 +-
weave/README.md | 2 +-
weave/metadata.json | 2 +-
4 files changed, 4 insertions(+), 3 deletions(-)
추적 정보 : 나는 Bproject/마스터를 제공하지 않으면
[email protected]: ~/test (master) $ git log
commit 9116e133c8d84de1df9883a8b5558a2350ebc86e
Merge: e5dc318 eb2e273
Author: me <[email protected]>
Date: Wed Jun 14 13:03:16 2017 +0200
Merge commit 'eb2e2733a75d59eb1adebf4755d5b11cb74e2b98'
commit eb2e2733a75d59eb1adebf4755d5b11cb74e2b98
Author: me <[email protected]>
Date: Wed Jun 14 13:03:16 2017 +0200
Squashed 'weave/' changes from be74d83..9181306
9181306 make release used to update version to v0.8.7
3871cf5 Update changelog, tag v0.8.6, fix link in README
REVERT: be74d83 Update changelog, tag v0.8.6, fix link in README
git-subtree-dir: weave
git-subtree-split: 9181306caa304b4cf8b3764b1446c0c4006833d8
commit e5dc318c4437cd22ebddb9e82e8c419aef72a781
Merge: b1ac90e 19c0570
Author: me <[email protected]>
Date: Wed Jun 14 13:02:25 2017 +0200
Merge commit '19c0570a414c4fd1635444b7a937dfc41c93a847' as 'weave'
commit 19c0570a414c4fd1635444b7a937dfc41c93a847
Author: me <[email protected]>
Date: Wed Jun 14 13:02:25 2017 +0200
Squashed 'weave/' content from commit be74d83
git-subtree-dir: weave
git-subtree-split: be74d8368acd4815b6863daded46a232944e0d84
commit b1ac90efbfe5978bac52984c29e6ec7904ed9a75
Author: me <[email protected]>
Date: Wed Jun 14 13:02:05 2017 +0200
README.md added
[email protected]: ~/test (master) $ ll
total 4
-rw-rw-r-- 1 me me 0 Jun 14 13:01 README.md
drwxrwxr-x 8 me me 4096 Jun 14 13:03 weave
, 어떻게 자식 원격 I가 합병있어 알고 않습니다를? – cmaughan
@cmaughan 힘내는 모른다. 모든 것이 sha이고 각 sha (태그 또는 Bproject/master로도 표현됨)는 부모가있는 커밋을 참조하는 식으로 진행됩니다. 그래서 원격 저장소에서''git remote'에서'-f' 옵션을 가져 와서 모든 커밋과 섀시를 가져옵니다. 그리고 나서 당신은 당신의 나무에 어떤 나무 (원격, 물론 sha)를 합칩니다. 그것이 어떻게 작동하는지 희망 – MBO
좋아 - 나에게 좋은 소리! 충돌 태그 문제는 제가 궁금해했던 것입니다. - 내 앱에 v1.5 태그가 있고 v1.5 태그로 리모컨이 있으면 어떻게 처리합니까? 어느 쪽이든, 내가 찾고 있던 해결책 인 것 같다. – cmaughan