10

What git command should I use to be equivalent to svn checkout?

git checkout(?)

Many thanks!

4

2 回答 2

25

git clone更像是svn checkoutgit checkout. git checkout只需从本地存储库中签出分支或提交。 git clone制作远程存储库的新副本。

于 2013-09-19T17:00:25.053 回答
15

这正是我想要的:

SVN

$ svn checkout svn://foo.googlecode.com/svn/trunk foo
# make your changes
$ svn commit -m "my first commit"

胃肠道

$ git clone git@github.com:pjhyett/foo.git
# make your changes
$ git commit -a -m "my first commit"
$ git push

来自 Git 初学者:权威的实用指南

于 2013-09-26T13:58:35.440 回答