为git准确的`svn export`等价命令? [英] Exact `svn export` equivalent command for git?
问题描述
对于git,没有精确的
当心:这不是重复的问题。也就是说,我已经知道并测试了这些命令:
git clone --depth 1
< - 仍下载.git文件夹。
git checkout-init
< - 不适用于远程回购,它与一个工作副本一起工作(所以你需要先克隆)。 - remote
参数,但它只有两种可能的格式:tar或zip,所以我需要在下载后解压/ unzip,以及为此,我需要一个管道(|),但我在窗户上! (不是* n?x)
git clone --bare
< - 我仍然不知道这是什么,但它不是我所需要的。
请指教我是否有真正的 svn export
替换git?
在一些主机如GitHub中,您可以使 svn export
。
示例:
svn export https://github.com/GNOME/banshee/branches/master
连部分! (存储库的一些子部分)
示例:
svn export https://github.com/liferay/liferay-portal/branches/6.1.x/tools
对于您自己的仓库,您应该创建一些GitHub仓库并将其添加为远程仓库:
git remote add github https:// github .com /< user> /< repo> .git
然后
git push github< branch>
现在您可以像上面那样进行部分结帐。
There is no exact svn export
equivalent command for git? Really?
Beware: this is not a duplicate question. That is, I already know and have tested these commands:
git clone --depth 1
<- Still downloads the .git folder.git checkout-init
<- Doesn't work for a remote repo, it works with a working copy (so you need to clone first).git archive
<- This would be the perfect solution, because it has a--remote
argument, but it only has 2 possible formats: tar or zip, so I would need to untar/unzip after downloading, and for that I need a pipe (|), but I'm on windows!! (not *n?x)git clone --bare
<- I still don't know what the heck this is, but it's not what I need.
Please enlighten me is there a real svn export
replacement in git?
At some hostings like GitHub you can make exact svn export
.
Example:
svn export https://github.com/GNOME/banshee/branches/master
Even partial! (some subpart of the repository)
Example:
svn export https://github.com/liferay/liferay-portal/branches/6.1.x/tools
For your own repository you should create some GitHub repository and add it as a remote:
git remote add github https://github.com/<user>/<repo>.git
then
git push github <branch>
Now you able to do a partial checkout as above.
这篇关于为git准确的`svn export`等价命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!