Git 下载分支到本地机器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9875474/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:40:32  来源:igfitidea点击:

Git download branch to local machine

gitgithub

提问by Matrosov Alexander

I create push origin 'my branch' to github repo.

我创建推送源“我的分支”到 github 存储库。

Now, as I understand on github in 'my branch' I have full data about project (including my changes)

现在,正如我在“我的分支”中的 github 上所了解的,我拥有有关项目的完整数据(包括我的更改)

how to download this branch on my local machine with a git files?

如何使用 git 文件在我的本地机器上下载这个分支?

I mean this as if we make checkout command if we use svn.

我的意思是,如果我们使用 svn,就好像我们执行 checkout 命令一样。

回答by JustinDoesWork

I think you are looking for:

我认为您正在寻找:

git fetch origin [remote-branch]:[new-local-branch]

Also http://help.github.com/git-cheat-sheets/is a great resource for git.

另外http://help.github.com/git-cheat-sheets/是一个很好的 git 资源。