shallow-clone

How to clone seed/kick-start project without the whole history?

喜夏-厌秋 提交于 2019-11-28 05:39:06
Note that using --depth=1 parameter prevents you from pushing the project to a new repository . for details see: "Remote rejected" (shallow update not allowed) after changing Git remote URL You can do a git clone <git_url> delete the .git repository from your folder. Which will delete all your history. The you can do a git init which will create an entirely new git project for you. This may not be the best way. But this will work . Hope it helps. As long as you consider full loss of history to be no issue, the approach suggested by Ajay is perfectly valid. But in case you want to maintain the

git shallow clone (clone --depth) misses remote branches

六月ゝ 毕业季﹏ 提交于 2019-11-28 02:53:41
After cloning a remote repository it does not show any remote branch by -a option. What could be the problem? How to debug it? In this snippet two of the remote branches are not shown: $ git clone --depth 1 git://git.savannah.gnu.org/pythonwebkit.git $ cd pythonwebkit $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master $ git --version git version 1.8.3.1 Tried the same command on another machine, it works well: $ git clone --depth 1 git://git.savannah.gnu.org/pythonwebkit.git Receiving objects: 100% (186886/186886), 818.91 MiB | 3.44 MiB/s, done. $ cd

How to clone seed/kick-start project without the whole history?

孤街醉人 提交于 2019-11-27 19:17:35
问题 Note that using --depth=1 parameter prevents you from pushing the project to a new repository . for details see: "Remote rejected" (shallow update not allowed) after changing Git remote URL 回答1: You can do a git clone <git_url> delete the .git repository from your folder. Which will delete all your history. The you can do a git init which will create an entirely new git project for you. This may not be the best way. But this will work . Hope it helps. 回答2: As long as you consider full loss of

How to shallow clone a specific commit with depth 1?

不问归期 提交于 2019-11-27 11:26:04
Is it possible to shallow clone a specific commit in a repository, i.e. with depth 1? Something like git clone http://myrepo.git 728a4d --depth 1 to get the repository state as it is at the commit with SHA 728a4d... ? The motivation is to avoid having to clone the whole repository, then check out that specific commit, when we're only interested in the state of the repository at that specific commit. Starting with Git 2.5.0 (which needs to be available at both the client and server side) you can set uploadpack.allowReachableSHA1InWant=true on the server side to enable fetching of specific SHA1s

How to git fetch efficiently from a shallow clone

浪尽此生 提交于 2019-11-27 00:55:47
We use git to distribute an operating system and keep it upto date . We can't distribute the full repository since it's too large (>2GB), so we have been using shallow clones (~300M). However recently when fetching from a shallow clone, it's now inefficiently fetches the entire >2GB repository . This is an untenable waste of bandwidth for deployments. The git documentation says you cannot fetch from a shallow repository, though that's strictly not true. Are there any workarounds to make a git clone --depth 1 able to fetch just what's changed from it? Or some other strategy to keep the

How to shallow clone a specific commit with depth 1?

南楼画角 提交于 2019-11-26 12:08:46
问题 Is it possible to shallow clone a specific commit in a repository, i.e. with depth 1? Something like git clone http://myrepo.git 728a4d --depth 1 to get the repository state as it is at the commit with SHA 728a4d... ? The motivation is to avoid having to clone the whole repository, then check out that specific commit, when we\'re only interested in the state of the repository at that specific commit. 回答1: Starting with Git 2.5.0 (which needs to be available at both the client and server side)

How to git fetch efficiently from a shallow clone

妖精的绣舞 提交于 2019-11-26 09:28:35
问题 We use git to distribute an operating system and keep it upto date. We can\'t distribute the full repository since it\'s too large (>2GB), so we have been using shallow clones (~300M). However recently when fetching from a shallow clone, it\'s now inefficiently fetches the entire >2GB repository. This is an untenable waste of bandwidth for deployments. The git documentation says you cannot fetch from a shallow repository, though that\'s strictly not true. Are there any workarounds to make a