내가 어떤 마법 하나를 찾을 수 없습니다 - 라이너,하지만 git merge
(다시 한번 그 옵션을 시도 향해 내게 영감을위한 @ Wikiti)를하고 일을하는 것 같았다.
내가 뒤 따르는 마지막 방법은 꽤 아니며 git reset
횟수만큼 실행해야합니다.
이것은 완벽하지 않으며 모든 전문가 또는 gitlab 직원이 더 나은 솔루션을 제안하도록 권장합니다. 그것은 다른 사람들이 멀리 gh-pages
지점에서 이동하려고 도움이 될 것입니다 희망에서, 이것은 내가 그것을 어떻게입니다 :
이
git checkout master
git checkout -b master-docs
git merge gh-pages
# Reset the "master" files so that files deleted are left untouched by the merge
git reset src/
git checkout src/
git reset any-other-master-files
git checkout any-other-master-files
# Manually edit any conflicts, e.g. in .gitignore (with your favourite editor)
vi .gitignore
git add .gitignore
vi any-other-conflicting-files
git add any-other-conflicting-files
# Move the "gh-pages" files into "docs/" directory
mkdir docs
git mv *.md docs/
git mv *.html docs/
git mv _posts docs/
git mv _layout docs/
git mv any-other-gh-pages-files docs/
# Check that everything looks OK, there should be only files added to docs/
# If not, go through last steps again
git status
# Confirm the merge
git commit
# Push to origin
git push -u master-docs
# Go to github, make a pull req from master-docs to master for peer review
합니다 (result doesn't look bad)
* 문서 /'첫째. 그러나'gh-pages '의 분기는 2011 년으로 거슬러 올라가며 병합 충돌은 거대합니다. – IvanSanchez