github에서 git://github.com/rails/rails.git
포크 레일을 사용했습니다. 내 포크 리포지토리는 git://github.com/waseem/rails.git
입니다. 다른 사용자가 레일 메인 라인에 제출 한 일부 패치를 테스트하고 싶습니다. 내가 에 migration_status
브랜치에서 코드를 테스트하고 싶다고합시다.github 저장소에서 포크가 충돌을 일으킴
내가
master $ git remote add joelmoss git://github.com/joelmoss/rails.git
에게 말할 수 있습니다. 및
master $ git remote add mainline git://github.com/rails/rails.git
.
나는 주인장에 레일 메인 라인을 가져 왔습니다.
master $ git pull mainline master
http://guides.rubyonrails.org/contributing_to_ruby_on_rails.html#testing-patches에 따르면 전 지역 토픽 브랜치를 생성해야하고 joelmoss/migration_status
에서 변화를 당깁니다. 그래서,
master $ git checkout -b migration_status
로컬 항목 분기를 만듭니다. 내가 할 때
는 그리고 :
migration_status $ git pull joelmoss migration_status
migration_status $ git pull --rebase joelmoss migration_status
을 시도했지만 여전히 충돌이 발생합니다.
pull --rebase
의 경우, 내가 맞다고 생각하면 (잘못된 경우) git이 joelmoss/migration_status
에서 가져온 변경 사항 위에 로컬 변경 사항을 적용하려고합니다. 이상적으로 그것은 반대를 수행해야합니다. 이 옵션을 고려하기 위해 다음과 같이했습니다.
master $ git fetch joelmoss
master $ git checkout -b joel_migration_status joelmoss/migration_status
및
joel_migration_status $ git rebase master
충돌을 일으키지 않고 내 로컬 토픽 브랜치 중 하나에 제출 된 패치는 어떻게 가져 옵니까? 필자는 이러한 충돌을 해결할 수 없는데, 어떤 코드를 유지해야하는지에 관해 많이 알지 못하기 때문입니다.
감사 Karl. 'joelmoss/migration_status'가 3.1.0을 기반으로한다는 사실을 내가 어떻게 놓쳤는 지 모르겠습니다. – Waseem