svn vs git浅(稀疏)结账 - 分支,提交 [英] svn vs git shallow (sparse) checkout - branching, commit
问题描述
我有一个非常大的网站项目,有很多pdf,图片,php文件。我将文件作为单个项目导入svn。我使用svn浅结帐来检出部分子树,然后使用分支和标签等工作副本来节省空间并加快结帐时间。
I我想知道这是否可能与Git。我读过git不允许你在执行稀疏结帐后提交或分支。对于新的git版本,这仍然是真的吗?
使用以下命令,我能够检查出 Documentation /
目录来自位于 git://github.com/git/git.git
的git存储库:
git init
git remote add -f github-git git://github.com/git/git.git
git config core.sparsecheckout true
echo Documentation />> .git / info / sparse-checkout
git pull github-git master
git文档没有提及任何关于不能提交新的更改,所以它听起来像应该工作得很好。事实上,我测试了这一点,并且我可以确认我能够在执行稀疏检出后进行新的更改。
(我正在使用git 1.7版。 0.4)
I have a very big web project with lots of pdf, images, php files. I imported files into svn as a single project. I am using svn shallow checkout to checkout part of sub tree, and then use branch, and tag etc from the working copy to save space and speed up checkout time.
I am wondering if this is possible with git. I read that git does not allow you to commit or branch after you do sparse checkout. Is this still true with the newer git releases?
Using the following commands, I was able to check out just the Documentation/
directory from the git repository located at git://github.com/git/git.git
:
git init
git remote add -f github-git git://github.com/git/git.git
git config core.sparsecheckout true
echo Documentation/ >> .git/info/sparse-checkout
git pull github-git master
The git documentation doesn't say anything about not being able to commit new changes, so it sounds like it should work fine. Indeed, I tested this and I can confirm that I was able to commit new changes after doing a sparse checkout.
(I'm using git version 1.7.0.4)
这篇关于svn vs git浅(稀疏)结账 - 分支,提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!