this question의 역함환을 수행해야합니다.2 개의 Git 리포지토리를 하나의 스냅 샷과 현재 히스토리로 결합하는 방법은 무엇입니까?
거의 1 년 전 우리는 Git 저장소를 새로운 저장소에 두 지점의 현재 상태를 복사하여 분리했습니다. 간단하게하려면
<== 2015 Dec 1 Jan 2016 Jan ==>
Past history, till SVN New Repo First Commit All commits to present
우리 것 곧 자신의 Git 저장소로이 저장소에있는 프로젝트의 각을 설정하는 서브 트리를 사용하여, 그러나 나는 우리가 5 년 누락으로 너무 오래 그렇게하고 싶지 않아 중앙 저장소에서 커밋 된 내역. 여기에 지금까지 시도한 단계는 다음과 같습니다
cd ProjectFull/
git reset --hard # Project was in a branch
git checkout master # Go to master before trying to rebase
git remote add ProjectSplit ../ProjectSplit # New repository is in another directory
git fetch ProjectSplit # Fetch new repository
git cherry-pick <initial commit hash> --strategy-option theirs
git pull --rebase -s recursive -X theirs origin master
내 생각이었다 커밋 새로운 REPO의 초기을 체리 - 선택하고 그 커밋 떨어져 리베이스,하지만 실패합니다. 위에 나열한 명령은 오류가 발생하지 않지만 이전 저장소의 모든 기록을 삭제합니다. 이전 REPO의 패치를 통해 중간 실패
$ git rebase origin dev
First, rewinding head to replay your work on top of it...
Applying: Merge branch 'dev' of <REPO> into dev
Using index info to reconstruct a base tree...
<stdin>:298480: trailing whitespace.
<stdin>:298553: trailing whitespace.
<stdin>:298559: trailing whitespace.
<stdin>:298565: trailing whitespace.
<stdin>:298571: trailing whitespace.
warning: squelched 1751272 whitespace errors
warning: 1751277 lines add whitespace errors.
Falling back to patching base and 3-way merge...
CONFLICT (add/add): Merge conflict in <FILE>
Auto-merging <FILE>
CONFLICT (add/add): Merge conflict in <FILE>
Auto-merging <FILE>
CONFLICT (add/add): Merge conflict in <FILE>
Auto-merging <FILE>
CONFLICT (add/add): Merge conflict in <FILE>
Auto-merging <FILE>
CONFLICT (add/add): Merge conflict in <FILE>
Auto-merging <FILE>
<Same>
Failed to merge in the changes.
Patch failed at 0001 Merge branch 'dev' of <REPO> into dev
The copy of the patch that failed is found in:
ProjectFull/.git/rebase-apply/patch
When you have resolved this problem, run "git rebase --continue".
If you prefer to skip this patch, run "git rebase --skip" instead.
To check out the original branch and stop rebasing, run "git rebase --abort".
The script이 대답 :
여기 내 힘내 REBASE의 잘린 로그입니다.
This answer은 다른 저장소에서만 작동합니다. ,
은 바느질의 repos
펄 CPAN가있다 이눔 아 - 스티치 REPO를 고려
어떻게 리베이스가 실패합니까? 어떤 메시지? 이것은 나에게 rebase 시나리오처럼 보인다. – harmonica141
늦은 답장 @ harmonica141에 대해 유감스럽게 생각합니다. 오늘까지 작업을 다시 시작하지 않았고 곧 다시해야하므로 곧 다시 초점을 맞 춥니 다. – NobleUplift
a) 공백 오류를 추적 할 수 있었습니까? b)'실패한 패치의 복사본이 : ProjectFull/.git/rebase-apply/patch'에서 언급 한 폴더의 내용입니까? 무엇이 포함되어 있습니까? 거기에 커밋 하나만 있습니까? – harmonica141