shallow-clone

git shallow clone since specific commit

不想你离开。 提交于 2020-04-11 04:29:26
问题 I'd like to clone a repository with a longish history. I'm only interested in a few short-lived not-yet-merged feature branches and master . In order to not confuse myself with all that past history and merged branches, I'd like to do a shallow clone starting at a specific commit SHA. However, so far I've only found documentation on how to do shallow clones that only include the last n commits ( --depth ) resp, the commits since a specific date ( --shallow-since ). Is there a way to specify a

Can I clone just the latest changesets of a repository instead of the entire history?

南笙酒味 提交于 2019-12-30 04:00:05
问题 I have to work with an hg repository that has millions of lines of code and hundreds of thousands of changesets. As you can imagine, this really slows down mercurial and TortoiseHg. Is it possible for me to create a local repository that only has the latest few thousand changesets? Not only would this hopefully make things run snappier, but it might also save me some hard drive space. 回答1: No you can't, but you can optimise your local clone. Have a look at my answer to https://stackoverflow

How to make a visible github fork without the commit history?

戏子无情 提交于 2019-12-25 00:53:15
问题 Let's say you want to clone an old (GitHub) repository A into your own repository B . However, you don't need any branches nor do you want the very long commit history. What you want is a shallow clone as a snapshot of the most current status of the repo. Preferably with the latest commit messages, only, while still showing from what point in A it was forked from. This is graphically shown in GitHubs Insights > Network tab, as arrows going from one users repo to another. The problem is that

How to maintain shallow clone of a set of branches in git

[亡魂溺海] 提交于 2019-12-23 16:24:51
问题 I'd like to maintain a shallow, mirrored, bare clone of several branches. I will clone locally from that for different project branches. e.g. +------------------------------------------------------------------+ | repo1: server1:original-repo.git branches: A, B, C, D, E | +------------------------------------------------------------------+ ↓ +------------------------------------------------------------------+ | repo2: server2:shallow-bare-selective-clone branches: A, B only | +----------------

Shallow clone with submodules in git, how to use pointed commits and not latest ones? [duplicate]

浪子不回头ぞ 提交于 2019-12-22 03:24:26
问题 This question already has answers here : How to shallow clone a specific commit with depth 1? (4 answers) Closed 2 years ago . I know it's possible to have shallow submodules using the --depth option with git submodule update . However, If I run git submodule update --init --recursive --depth 1 on my project with several submodules, I get a fatal: reference is not a tree . So I've tried again with git submodule update --init --recursive --depth 100 which worked correctly, however I'd like to

git clone: warning: --depth is ignored in local clones; use file:// instead

冷暖自知 提交于 2019-12-22 03:22:09
问题 We have a remote repository on a shared folder in our local network. I attempted to make a shallow clone: git clone --depth 1 //gitrepos-pc/git/foo/ It gave me this warning, and made a full clone: warning: --depth is ignored in local clones; use file:// instead. 回答1: Ok, after some experimenting I got it, I had to use git clone --depth 1 file:////gitrepos-pc/git/foo/ It had to be 4 slashes, not 3, which was a bit unexpected. I am still not sure why it insists on file://// but I guess it's

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

你。 提交于 2019-12-17 17:21:21
问题 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

Pushing to github after a shallow clone

家住魔仙堡 提交于 2019-12-17 10:41:24
问题 I had a massive git repo because of a huge number of commits, so following advice here I created a shallow clone. I've made changes to this new local repo, and now I want to push to my origin at Github (and then on to my staging and production remotes on Heroku). Perhaps one day I'll learn to read the documentation: The git clone --depth command option says --depth Create a shallow clone with a history truncated to the specified number of revisions. A shallow repository has a number of

how to get full commit log from a shallow clone?

只愿长相守 提交于 2019-12-11 05:06:41
问题 Is it possible to get the commit log history from a local copy which is a shallow clone (--depth = 1) I am using shallow clone in my jenkins build job to get the code and build but the changelog is not complete because I am using shallow clone. Is there a way around that? 回答1: No you cannot. But if it helps, you can get a list of tags (if your jenkins job wants to check a tag) via git ls-remote. Mort 来源: https://stackoverflow.com/questions/30158978/how-to-get-full-commit-log-from-a-shallow

What is the status of the Mercurial Shallow Clone extension?

半城伤御伤魂 提交于 2019-12-11 01:58:12
问题 Talk of Shallow Clone Extension There had been some talk about work on an unofficial Shallow Clone extension for Mercurial. This extension would function similarly to the git clone --depth X extension, but would provide better push support and merge safety. Basically, it would let users clone a smaller sub-set of history to save time and space, but still benefit from all the other benefits of hg. After all, not all developers need the whole history back to changeset 0 to be productive. Links