質問
githubプロジェクトの別のブランチを追跡しようとしています。 プロジェクトはrestful_authenticationです:
http://github.com/technoweenie/restful-authentication
しかし、私が本当にクローンしたいのはモジュラーブランチです:
http://github.com/technoweenie/restful-authentication/tree/modular
このガイドを見つけました:
http://github.com/guides/showing-and-tracking -リモートブランチ
次のようなコマンドをいくつか試しました:
git checkout --track -b lmod http://github.com/technoweenie/restful-authentication/tree/modular
and
git checkout --track -b lmod git://github.com/technoweenie/restful-authentication.git/modular
しかし、次のエラーが表示されます:
fatal: git checkout: updating paths is incompatible with switching branches
これを行う正しい方法についての考えはありますか?
ありがとう
解決
ブランチを複製することはできません。完全なリポジトリを複製する必要があります:
git clone git://github.com/technoweenie/restful-authentication.git
その後、ローカルリポジトリで追跡ブランチを使用できます:
cd restful-authentication
git checkout --track -b lmod origin/modular
クローン作成後、gitは「リモート」を設定していることに注意してください。 「origin」という名前のリモートリポジトリと「origin / modular」用「モジュール」を識別します。 「オリジン」のブランチリモート。
所属していません StackOverflow