相当于 git 的“svn checkout”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18900774/
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
Equivalent of "svn checkout" for git?
提问by Daniel Bonetti
What git command should I use to be equivalent to svn checkout?
我应该使用什么 git 命令来等效于svn checkout?
git checkout(?)
Many thanks!
非常感谢!
回答by Carl Norum
git cloneis more of an analogue to svn checkoutthan git checkout. git checkoutjust checks out a branch or commit from your local repository. git clonemakes a new copy of a remote repository.
git clonesvn checkout比更类似于git checkout。 git checkout只需从本地存储库中检出分支或提交即可。 git clone制作远程存储库的新副本。
回答by Daniel Bonetti
This is exactly what I wanted:
这正是我想要的:
SVN
SVN
$ svn checkout svn://foo.googlecode.com/svn/trunk foo
# make your changes
$ svn commit -m "my first commit"
GIT
通用电气
$ git clone [email protected]:pjhyett/foo.git
# make your changes
$ git commit -a -m "my first commit"
$ git push

