하나의 git repo를 3으로 분리했습니다. Detach (move) subdirectory into separate Git repository을 사용하여 폴더를 분리하고 새로운 git repos에 성공적으로 밀어 넣었습니다. 기존 repo에서 다음 명령을 사용하여 이동 된 디렉토리를 지 웠습니다. 내가 원래 REPO에 git st
을 수행 할 때git push-git filter-branch가 거부되었습니다.
git filter-branch -f --index-filter "git rm -q -r -f --cached --ignore-unmatch lib/xxx/$REPO" --prune-empty HEAD
지금, 내가 얻을 : 내가 git push
하려고하면
# On branch 1.5.0
nothing to commit (working directory clean)
, 내가 얻을 :
! [rejected] 1.5.0 -> 1.5.0 (non-fast-forward)
error: failed to push some refs to '[email protected]:/xxx/.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
내 생각 엔 -f를 사용하는 것입니다 : git push -f origin <branch>
하지만 기존 repo가 수정 될 것이므로 확인하고 싶습니다.