저는 master 및 gh-pages 분기가있는 Laravel App이있는 저장소가 있습니다.git checkout gh-pages 분기에 master 분기의 파일이 있습니다.
내가 할 때
git checkout gh-pages
모든 작동하지만 두 개의 디렉토리 '응용 프로그램'마스터 지점 쇼에서 위로 '공급 업체'. gh-pages 브랜치에서는 두 페이지를 gitignore에 추가하여 gh-pages 원격 브랜치로 푸시되지 않도록했습니다. 그런 다음 공급 업체 디렉토리를 삭제하려고했습니다. master 브랜치로 돌아 왔을 때 벤더 디렉토리가 없어 졌으므로 나는 그것을 얻기 위해 작곡가 설치를 실행해야했습니다.
그런 다음 저장소를 다시 복제하고 gh-pages 분기를 가져오고 같은 문제가 발생합니다.
gh-pages 브랜치에서는 무시되지만 그들은 거기에 속하지 않으므로 나는 왜 그들이 거기에 있는지 혼란스러워합니다. 이 두 가지 디렉토리에 나타나는 유일한 두 개의 디렉토리입니다.
github https://github.com/isimmons/office-twit에있는 저장소를 보면이 디렉토리가 존재하지 않는다는 것을 알 수 있습니다. 그래서 내 로컬 복제본 저장소에 왜 있는지 알 수 없습니다.
업데이트 : clo 출력의 전체 목록은 여기에서 repo 클린 복제본으로 시작하십시오./app 디렉토리를 gh-pages 브랜치에서 없애고 문제가 여전히/vendor 디렉토리에 있습니다.
C:\Users\lotus\projects
λ git clone [email protected]:isimmons/office-twit.git
Cloning into 'office-twit'...
remote: Counting objects: 470, done.
remote: Compressing objects: 100% (254/254), done.
rRemote: Total 470 (delta 190), reused 458 (delta 178)
Receiving objects: 100% (470/470), 946.23 KiB | 460.00 KiB/s, done.
Resolving deltas: 100% (190/190), done.
C:\Users\lotus\projects
λ cd office-twit\
C:\Users\lotus\projects\office-twit (master)
λ ls
app bootstrap composer.lock phpunit.xml readme.md upgrade.md
artisan composer.json CONTRIBUTING.md public server.php
C:\Users\lotus\projects\office-twit (master)
λ git remote
origin
C:\Users\lotus\projects\office-twit (master)
λ git branch
* master
이 시점에서 모든 것이 좋습니다. 내가 가진 모든 것이 'master'브랜치가있는 'origin'remote이고,/vendor 디렉토리가 없어야한다는 것을 두 번 확인했다.
gh-pages 브랜치를 가져 오기 전에/vendor 디렉토리를 추가하는 'composer update'를 수행합니다. 이 때문에/공급 업체는 .gitignore 파일에 있어야 나는이 시점에서해야하고, 자식의 상태와 같은 내가/공급 업체에 볼 수있는 디렉토리의 내용을 나열
C:\Users\lotus\projects\office-twit (master)
λ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing intouch/newrelic (dev-master aca23cc)
Loading from cache
- Installing symfony/translation (2.4.x-dev 0919e0f)
Loading from cache
. . . many more packages install . . .
Generating autoload files
Generating optimized class loader
깨끗한 디렉토리를 보여줍니다.
C:\Users\lotus\projects\office-twit (master)
λ ls
app bootstrap composer.lock phpunit.xml readme.md upgrade.md
artisan composer.json CONTRIBUTING.md public server.php vendor
C:\Users\lotus\projects\office-twit (master)
λ git status
# On branch master
nothing to commit, working directory clean
다음은 내가 체크 아웃 내가 원격 (원점)가 뭔지 동일해야합니다 로컬 그래서 무엇 GH-페이지 분기를 추적 할 수 있습니다.
C:\Users\lotus\projects\office-twit (master)
λ git checkout -b gh-pages origin/gh-pages
Branch gh-pages set up to track remote branch gh-pages from origin.
Switched to a new branch 'gh-pages'
어떻게 든 볼 수있는/공급 업체 디렉토리는 디렉토리가 존재하지 않습니다 https://github.com/isimmons/office-twit/tree/gh-pages에서 원격보기 GH-페이지 분기에 비록 GH-페이지 디렉토리에 표시한다. 그래서 이것은 지역적으로 일어나고 있습니다.
C:\Users\lotus\projects\office-twit (gh-pages)
λ ls
assets index.html README.md vendor
C:\Users\lotus\projects\office-twit (gh-pages)
λ git status
# On branch gh-pages
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# vendor/
nothing added to commit but untracked files present (use "git add" to track)
나는/공급 업체가 속해 있지 않고 추적되는 것을 계속됩니다 .gitignore 할 수/공급 업체를 추가하는 동안, 그것은 거기 안 때문에이 시점에서 GH-페이지를 밀어 싶지 않아 모든.
gh-pages 브랜치에서/vendor를 삭제하면 git status에 깨끗한 작업 디렉토리가 표시되지만 다시 master 브랜치로 변경하면/공급 업체도 삭제됩니다.
C:\Users\lotus\projects\office-twit (gh-pages)
λ rm -rf vendor
C:\Users\lotus\projects\office-twit (gh-pages)
λ git status
# On branch gh-pages
nothing to commit, working directory clean
C:\Users\lotus\projects\office-twit (gh-pages)
λ git checkout master
Switched to branch 'master'
C:\Users\lotus\projects\office-twit (master)
λ ls
app bootstrap composer.lock phpunit.xml readme.md upgrade.md
artisan composer.json CONTRIBUTING.md public server.php
마지막 업데이트 : 나는 왜 그/app 디렉토리가 전에 있었는지 알아 냈습니다.master 브랜치가 깨끗한 경우에도 SublimeText에서 편집을 위해 로컬 repo를 열었을 때 gh-pages 브랜치로 변경하면 해당 브랜치에/app가 다시 나타납니다. 내가 엄격하게 cli를 사용했기 때문에 이것은 일어나지 않았습니다. 따라서 문제의 그 부분에 대한 해결책은 브랜치를 전환하기 전에/app 디렉토리를 완전히 닫는 것입니다.
GitHub이'gh-pages' 폴더 대신'gh-pages' 브랜치를 원한다는 것이 이상하게 보입니다. 폴더를 사용하면 프로젝트의 데모에서 마스터의 파일을 사용하는 것이 훨씬 쉽습니다. 두 가지를 항상 동기화 상태로 유지하지 않아도됩니다. [gh- 페이지를 마스터 링하여 미러링하는 방법] (http://stackoverflow.com/questions/5807459/github-mirroring-gh-pages-to-master)에 대한 높은 투표 결과가 있습니다. –