Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以将项目克隆到新分支中?我已经克隆了主存储库,并希望将另一个作为其分支的存储库克隆到一个分支中。我希望能够使用 git diff 继续比较差异。如何才能做到这一点 ?
你可以指定一个新的遥控器,然后调用 git fetch:
git remote add fork git://example.com/repo.git git fetch fork
然后,您可以将分支与
git diff origin/master fork/master