{"thread":{"id":"53348","subject":"[PATCH v4 1/4] gitfaq: files in .gitignore are tracked","startedAt":"2020-04-29T09:38:37Z","lastAt":"2021-05-06T02:49:39Z","messageCount":21,"participants":["Shourya Shukla","Elijah Newren","Junio C Hamano","Derrick Stolee","dyrone teng"],"isPatch":true,"patchVersion":4,"patchTotal":4},"messages":[{"id":"396531","messageId":"20200429093811.8475-1-shouryashukla.oo@gmail.com","threadId":"53348","inReplyTo":null,"subject":"[PATCH v4 1/4] gitfaq: files in .gitignore are tracked","fromName":"Shourya Shukla","fromEmail":"shouryashukla.oo@gmail.com","sentAt":"2020-04-29T09:38:08Z","receivedAt":"2020-04-29T09:38:37Z","isPatch":true,"sender":{"key":"shouryashukla.oo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43680618?v=4"},"body":"Add issue in 'Common Issues' section which addresses the problem of\nGit tracking files/paths mentioned in '.gitignore'.\n\nSigned-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n---\n Documentation/gitfaq.txt | 9 +++++++++\n 1 file changed, 9 insertions(+)\n\ndiff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\nindex 1cf83df118..b1e758ffd1 100644\n--- a/Documentation/gitfaq.txt\n+++ b/Documentation/gitfaq.txt\n@@ -223,6 +223,15 @@ a file checked into the repository which is a template or set of defaults which\n can then be copied alongside and modified as appropriate.  This second, modified\n file is usually ignored to prevent accidentally committing it.\n \n+[[files-in-.gitignore-are-tracked]]\n+I asked Git to ignore various files, yet they are still tracked::\n+\tA `gitignore` file specifies intentionally untracked files\n+\tthat Git should ignore. Files already tracked by Git are\n+\tnot affected. See linkgit:gitignore[5] for details.\n+\tTo ignore and untrack the files appearing in the staging are\n+\tit is advised to use `git rm --cached <file>`as well as make\n+\tthe file pattern is mentioned in the '.gitignore'.\n+\n Hooks\n -----\n \n-- \n2.26.2\n\n"},{"id":"396532","messageId":"20200429093811.8475-2-shouryashukla.oo@gmail.com","threadId":"53348","inReplyTo":"20200429093811.8475-1-shouryashukla.oo@gmail.com","subject":"[PATCH v4 2/4] gitfaq: changing the remote of a repository","fromName":"Shourya Shukla","fromEmail":"shouryashukla.oo@gmail.com","sentAt":"2020-04-29T09:38:09Z","receivedAt":"2020-04-29T09:38:40Z","isPatch":true,"sender":{"key":"shouryashukla.oo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43680618?v=4"},"body":"Add issue in 'Common Issues' section which addresses the problem of\nchanging the remote of a repository, covering various cases in which\none might want to change the remote and the ways to do the same.\n\nSigned-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n---\n Documentation/gitfaq.txt | 11 +++++++++++\n 1 file changed, 11 insertions(+)\n\ndiff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\nindex b1e758ffd1..7d294306f9 100644\n--- a/Documentation/gitfaq.txt\n+++ b/Documentation/gitfaq.txt\n@@ -232,6 +232,17 @@ I asked Git to ignore various files, yet they are still tracked::\n \tit is advised to use `git rm --cached <file>`as well as make\n \tthe file pattern is mentioned in the '.gitignore'.\n \n+[[changing-remote-of-the-repository]]\n+I want to change the remote of my repository. How do I do that?::\n+\tA remote is an identifier for a location to which Git pushes your\n+\tchanges as well as fetches any new changes from (if any). There\n+\tmight be different circumstances in which one might need to change\n+\tthe remote URL (see linkgit:git-remote[1]). To change the remote URL\n+\tone may use: git remote set-url <name> <newurl>\n++\n+One can list the remotes of a repository using `git remote -v` command.\n+The default name of a remote is 'origin'.\n+\n Hooks\n -----\n \n-- \n2.26.2\n\n"},{"id":"396533","messageId":"20200429093811.8475-3-shouryashukla.oo@gmail.com","threadId":"53348","inReplyTo":"20200429093811.8475-1-shouryashukla.oo@gmail.com","subject":"[PATCH v4 3/4] gitfaq: shallow cloning a repository","fromName":"Shourya Shukla","fromEmail":"shouryashukla.oo@gmail.com","sentAt":"2020-04-29T09:38:10Z","receivedAt":"2020-04-29T09:38:43Z","isPatch":true,"sender":{"key":"shouryashukla.oo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43680618?v=4"},"body":"Add issue in 'Common issue' section which covers issues with cloning\nlarge repositories. Use partial cloning to selectively clone the\nrepository.\n\nSigned-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n---\nI wanted to ask why is there no mention of partial cloning in\nthe 'git-clone' documentation? Is it because it is an experimental\nfeature?\n\n Documentation/gitfaq.txt | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\ndiff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\nindex 7d294306f9..6f32846e3d 100644\n--- a/Documentation/gitfaq.txt\n+++ b/Documentation/gitfaq.txt\n@@ -243,6 +243,16 @@ I want to change the remote of my repository. How do I do that?::\n One can list the remotes of a repository using `git remote -v` command.\n The default name of a remote is 'origin'.\n \n+[[shallow-cloning]]\n+The repository I am trying to clone is too big. Is there an alternative\n+way of cloning it in lesser space?::\n+\tA good way to save up space when cloning a repository is\n+\tby using `partial clones`. A partial clone will clone the\n+\tfull history of the repository but will skip out the entities\n+\tspecified by the `--filter` option one uses in `git clone`.\n+\tAny entity which has not been cloned to save space can be cloned\n+\ton-demand. See linkgit:partial-clone[1].\n+\n Hooks\n -----\n \n-- \n2.26.2\n\n"},{"id":"396534","messageId":"20200429093811.8475-4-shouryashukla.oo@gmail.com","threadId":"53348","inReplyTo":"20200429093811.8475-1-shouryashukla.oo@gmail.com","subject":"[PATCH v4 4/4] gitfaq: fetching and pulling a repository","fromName":"Shourya Shukla","fromEmail":"shouryashukla.oo@gmail.com","sentAt":"2020-04-29T09:38:11Z","receivedAt":"2020-04-29T09:38:46Z","isPatch":true,"sender":{"key":"shouryashukla.oo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43680618?v=4"},"body":"Add an issue in 'Common Issues' section which addresses the confusion\nbetween performing a 'fetch' and a 'pull'.\n\nSigned-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n---\n Documentation/gitfaq.txt | 20 ++++++++++++++++++++\n 1 file changed, 20 insertions(+)\n\ndiff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\nindex 6f32846e3d..e091513639 100644\n--- a/Documentation/gitfaq.txt\n+++ b/Documentation/gitfaq.txt\n@@ -253,6 +253,26 @@ way of cloning it in lesser space?::\n \tAny entity which has not been cloned to save space can be cloned\n \ton-demand. See linkgit:partial-clone[1].\n \n+[[fetching-and-pulling]]\n+How do I know if I want to do a fetch or a pull?::\n+\tA fetch brings in the latest changes made upstream (i.e., the\n+\tremote repository we are working on). This allows us to inspect\n+\tthe changes made upstream and integrate all those changes (if\n+\tand only if we want to) or only cherry pick certain changes.\n+\tFetching does not have any immediate effects on the local\n+\trepository.\n+\n+\tA pull is a wrapper for a fetch and merge. This means that doing\n+\ta `git pull` will not only fetch the changes made upstream but\n+\tintegrate them as well with our local repository. The merge may\n+\tgo smoothly or have merge conflicts depending on the case. A pull\n+\tdoes not allow you to review any changes made upstream but rather\n+\tmerge those changes on their own.\n++\n+This is the reason why it is sometimes advised to fetch the changes\n+first and then merge them accordingly because not every change might\n+be of utility to the user.\n+\n Hooks\n -----\n \n-- \n2.26.2\n\n"},{"id":"396559","messageId":"CABPp-BFt_5-OyOw9YbYJhhu1P4CJLOi65wdyRckOY5_acRejGg@mail.gmail.com","threadId":"53348","inReplyTo":"20200429093811.8475-4-shouryashukla.oo@gmail.com","subject":"Re: [PATCH v4 4/4] gitfaq: fetching and pulling a repository","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-04-29T15:56:49Z","receivedAt":"2020-04-29T15:57:02Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Wed, Apr 29, 2020 at 2:38 AM Shourya Shukla\n<shouryashukla.oo@gmail.com> wrote:\n>\n> Add an issue in 'Common Issues' section which addresses the confusion\n> between performing a 'fetch' and a 'pull'.\n>\n> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n> ---\n>  Documentation/gitfaq.txt | 20 ++++++++++++++++++++\n>  1 file changed, 20 insertions(+)\n>\n> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> index 6f32846e3d..e091513639 100644\n> --- a/Documentation/gitfaq.txt\n> +++ b/Documentation/gitfaq.txt\n> @@ -253,6 +253,26 @@ way of cloning it in lesser space?::\n>         Any entity which has not been cloned to save space can be cloned\n>         on-demand. See linkgit:partial-clone[1].\n>\n> +[[fetching-and-pulling]]\n> +How do I know if I want to do a fetch or a pull?::\n> +       A fetch brings in the latest changes made upstream (i.e., the\n> +       remote repository we are working on). This allows us to inspect\n> +       the changes made upstream and integrate all those changes (if\n> +       and only if we want to) or only cherry pick certain changes.\n> +       Fetching does not have any immediate effects on the local\n> +       repository.\n\nMaybe change that last sentence to \"Fetching does not modify the\ncurrent branch\"?  The local repository certainly gets bigger, and the\nremote tracking branches are updated as well as their reflogs, and it\nmight trigger a gc, all of which sound like immediate effects to me.\n\n> +\n> +       A pull is a wrapper for a fetch and merge. This means that doing\n\n...for a fetch and merge or a fetch and rebase.  This means...\n\n> +       a `git pull` will not only fetch the changes made upstream but\n> +       integrate them as well with our local repository. The merge may\n\n...with our current branch.  The merge or rebase...\n\n> +       go smoothly or have merge conflicts depending on the case. A pull\n> +       does not allow you to review any changes made upstream but rather\n> +       merge those changes on their own.\n\nI don't understand this last sentence.  You can definitely review\nchanges made upstream after a pull; e.g. git log @{u}@{1}..@{u}\n\n> ++\n> +This is the reason why it is sometimes advised to fetch the changes\n> +first and then merge them accordingly because not every change might\n> +be of utility to the user.\n\nI don't understand the purpose of this paragraph.\n"},{"id":"396561","messageId":"CABPp-BG2zf8w6ouK3nn8bid_HKWh2g6Gu-UB65q3Z9V2D80X7A@mail.gmail.com","threadId":"53348","inReplyTo":"20200429093811.8475-3-shouryashukla.oo@gmail.com","subject":"Re: [PATCH v4 3/4] gitfaq: shallow cloning a repository","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-04-29T16:00:36Z","receivedAt":"2020-04-29T16:00:51Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Wed, Apr 29, 2020 at 2:38 AM Shourya Shukla\n<shouryashukla.oo@gmail.com> wrote:\n>\n> Add issue in 'Common issue' section which covers issues with cloning\n> large repositories. Use partial cloning to selectively clone the\n> repository.\n>\n> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n> ---\n> I wanted to ask why is there no mention of partial cloning in\n> the 'git-clone' documentation? Is it because it is an experimental\n> feature?\n>\n>  Documentation/gitfaq.txt | 10 ++++++++++\n>  1 file changed, 10 insertions(+)\n>\n> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> index 7d294306f9..6f32846e3d 100644\n> --- a/Documentation/gitfaq.txt\n> +++ b/Documentation/gitfaq.txt\n> @@ -243,6 +243,16 @@ I want to change the remote of my repository. How do I do that?::\n>  One can list the remotes of a repository using `git remote -v` command.\n>  The default name of a remote is 'origin'.\n>\n> +[[shallow-cloning]]\n\nWhy is this marked as \"shallow-cloning\"?\n\n> +The repository I am trying to clone is too big. Is there an alternative\n> +way of cloning it in lesser space?::\n> +       A good way to save up space when cloning a repository is\n\n\"save space\" instead of \"save up space\"?\n\n> +       by using `partial clones`. A partial clone will clone the\n> +       full history of the repository but will skip out the entities\n> +       specified by the `--filter` option one uses in `git clone`.\n> +       Any entity which has not been cloned to save space can be cloned\n> +       on-demand. See linkgit:partial-clone[1].\n> +\n\nI like this much better than suggesting shallow clones, though you\nshould mention that partial clones (currently?) presume that you have\nan always-on network connection to the original repository because\nsubsequent commands may need to fetch additional objects in order to\ncomplete.\n"},{"id":"396563","messageId":"CABPp-BGkZOyyoFiK3hsJ3FQq8MEBPy5aganHjA66vKFE20Wk0Q@mail.gmail.com","threadId":"53348","inReplyTo":"20200429093811.8475-1-shouryashukla.oo@gmail.com","subject":"Re: [PATCH v4 1/4] gitfaq: files in .gitignore are tracked","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-04-29T16:16:01Z","receivedAt":"2020-04-29T16:16:18Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Wed, Apr 29, 2020 at 2:38 AM Shourya Shukla\n<shouryashukla.oo@gmail.com> wrote:\n>\n> Add issue in 'Common Issues' section which addresses the problem of\n> Git tracking files/paths mentioned in '.gitignore'.\n>\n> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n> ---\n>  Documentation/gitfaq.txt | 9 +++++++++\n>  1 file changed, 9 insertions(+)\n>\n> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> index 1cf83df118..b1e758ffd1 100644\n> --- a/Documentation/gitfaq.txt\n> +++ b/Documentation/gitfaq.txt\n> @@ -223,6 +223,15 @@ a file checked into the repository which is a template or set of defaults which\n>  can then be copied alongside and modified as appropriate.  This second, modified\n>  file is usually ignored to prevent accidentally committing it.\n>\n> +[[files-in-.gitignore-are-tracked]]\n> +I asked Git to ignore various files, yet they are still tracked::\n> +       A `gitignore` file specifies intentionally untracked files\n> +       that Git should ignore. Files already tracked by Git are\n> +       not affected. See linkgit:gitignore[5] for details.\n> +       To ignore and untrack the files appearing in the staging are\n> +       it is advised to use `git rm --cached <file>`as well as make\n> +       the file pattern is mentioned in the '.gitignore'.\n\nMostly looks good, but I can't help but nitpick several small items:\nThe first sentence alone seems to slightly undercut the answer, so\nit'd be nice to make sure the first two sentences are just one.  Also,\nit doesn't explain how people get into this state, which is probably\nsomething users are curious about.  The \"To ignore and untrack the\nfiles\" lists multiple end results, making it unclear which parts of\nthe end results the suggested steps are addressing.  There's also a\n\"staging are\" typo (should be \"staging area\").\n\nHow about something like:\n\nThe purpose of gitignore files is to ensure that certain files not\ntracked by Git remain untracked.  However, git allows people to\noverride the `gitignore` rules by using the --force option to `git\nadd`, and sometimes people started tracking a file unintentionally\nbefore adding a pattern covering it to the gitignore rules.  If you\nwant to untrack a file, run `git rm --cached <file>` (and then\ncommit).  See linkgit:gitignore[5] for details.\n"},{"id":"396564","messageId":"CABPp-BFJe81XD6Sd0OPoLGG5u2Vr4xoQrM2N=20eLscw0r8oXw@mail.gmail.com","threadId":"53348","inReplyTo":"20200429093811.8475-2-shouryashukla.oo@gmail.com","subject":"Re: [PATCH v4 2/4] gitfaq: changing the remote of a repository","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-04-29T16:17:43Z","receivedAt":"2020-04-29T16:18:00Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"On Wed, Apr 29, 2020 at 2:38 AM Shourya Shukla\n<shouryashukla.oo@gmail.com> wrote:\n>\n> Add issue in 'Common Issues' section which addresses the problem of\n> changing the remote of a repository, covering various cases in which\n> one might want to change the remote and the ways to do the same.\n>\n> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n> ---\n>  Documentation/gitfaq.txt | 11 +++++++++++\n>  1 file changed, 11 insertions(+)\n>\n> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> index b1e758ffd1..7d294306f9 100644\n> --- a/Documentation/gitfaq.txt\n> +++ b/Documentation/gitfaq.txt\n> @@ -232,6 +232,17 @@ I asked Git to ignore various files, yet they are still tracked::\n>         it is advised to use `git rm --cached <file>`as well as make\n>         the file pattern is mentioned in the '.gitignore'.\n>\n> +[[changing-remote-of-the-repository]]\n> +I want to change the remote of my repository. How do I do that?::\n> +       A remote is an identifier for a location to which Git pushes your\n> +       changes as well as fetches any new changes from (if any). There\n> +       might be different circumstances in which one might need to change\n> +       the remote URL (see linkgit:git-remote[1]). To change the remote URL\n> +       one may use: git remote set-url <name> <newurl>\n> ++\n> +One can list the remotes of a repository using `git remote -v` command.\n> +The default name of a remote is 'origin'.\n\nLooks good to me.  :-)\n"},{"id":"396572","messageId":"xmqqimhixmd4.fsf@gitster.c.googlers.com","threadId":"53348","inReplyTo":"20200429093811.8475-1-shouryashukla.oo@gmail.com","subject":"Re: [PATCH v4 1/4] gitfaq: files in .gitignore are tracked","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-29T16:55:35Z","receivedAt":"2020-04-29T16:55:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Shourya Shukla <shouryashukla.oo@gmail.com> writes:\n\n> Add issue in 'Common Issues' section which addresses the problem of\n> Git tracking files/paths mentioned in '.gitignore'.\n>\n> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n> ---\n>  Documentation/gitfaq.txt | 9 +++++++++\n>  1 file changed, 9 insertions(+)\n>\n> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> index 1cf83df118..b1e758ffd1 100644\n> --- a/Documentation/gitfaq.txt\n> +++ b/Documentation/gitfaq.txt\n> @@ -223,6 +223,15 @@ a file checked into the repository which is a template or set of defaults which\n>  can then be copied alongside and modified as appropriate.  This second, modified\n>  file is usually ignored to prevent accidentally committing it.\n>  \n> +[[files-in-.gitignore-are-tracked]]\n> +I asked Git to ignore various files, yet they are still tracked::\n> +\tA `gitignore` file specifies intentionally untracked files\n> +\tthat Git should ignore. Files already tracked by Git are\n> +\tnot affected. See linkgit:gitignore[5] for details.\n> +\tTo ignore and untrack the files appearing in the staging are\n> +\tit is advised to use `git rm --cached <file>`as well as make\n> +\tthe file pattern is mentioned in the '.gitignore'.\n\nAfter trimming down, it got a lot more readable.  The last sentence\nis not quite, though, with riddled with typos.  Also the order of\nuntrack/ignore and steps to achieve these two things should match in\nthe description.\n\n\tTo untrack and ignore files, use `git rm --cached <file>`\n\tand add a pattern to `.gitignore` that matches the <file>.\n\nmay be the minimum fix.\n\nThanks.\n"},{"id":"396573","messageId":"xmqqees6xm34.fsf@gitster.c.googlers.com","threadId":"53348","inReplyTo":"20200429093811.8475-2-shouryashukla.oo@gmail.com","subject":"Re: [PATCH v4 2/4] gitfaq: changing the remote of a repository","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-29T17:01:35Z","receivedAt":"2020-04-29T17:01:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Shourya Shukla <shouryashukla.oo@gmail.com> writes:\n\n> Add issue in 'Common Issues' section which addresses the problem of\n> changing the remote of a repository, covering various cases in which\n> one might want to change the remote and the ways to do the same.\n>\n> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n> ---\n>  Documentation/gitfaq.txt | 11 +++++++++++\n>  1 file changed, 11 insertions(+)\n>\n> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> index b1e758ffd1..7d294306f9 100644\n> --- a/Documentation/gitfaq.txt\n> +++ b/Documentation/gitfaq.txt\n> @@ -232,6 +232,17 @@ I asked Git to ignore various files, yet they are still tracked::\n>  \tit is advised to use `git rm --cached <file>`as well as make\n>  \tthe file pattern is mentioned in the '.gitignore'.\n>  \n> +[[changing-remote-of-the-repository]]\n> +I want to change the remote of my repository. How do I do that?::\n> +\tA remote is an identifier for a location to which Git pushes your\n> +\tchanges as well as fetches any new changes from (if any). There\n> +\tmight be different circumstances in which one might need to change\n> +\tthe remote URL (see linkgit:git-remote[1]). To change the remote URL\n> +\tone may use: git remote set-url <name> <newurl>\n> ++\n> +One can list the remotes of a repository using `git remote -v` command.\n> +The default name of a remote is 'origin'.\n\nWith the trimming, it got a lot easier to follow.  \n\nWe should strive to (1) make sure any FAQ entry can have a pointer\nto more comprehensive and canonical documentation, and (2) an FAQ\nentry with such a pointer does not consume more than one paragraph,\nsay no more than 5 lines.\n\nIt may be tempting to cram as much information as it comes to your\nhead as possible when writing a FAQ document, but for those who need\nFAQ list, a list of pointers with clear and concise summary is more\nhelpful.\n\nThanks.\n"},{"id":"396574","messageId":"xmqq7dxyxlpj.fsf@gitster.c.googlers.com","threadId":"53348","inReplyTo":"20200429093811.8475-3-shouryashukla.oo@gmail.com","subject":"Re: [PATCH v4 3/4] gitfaq: shallow cloning a repository","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-29T17:09:44Z","receivedAt":"2020-04-29T17:09:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Shourya Shukla <shouryashukla.oo@gmail.com> writes:\n\n> Add issue in 'Common issue' section which covers issues with cloning\n> large repositories. Use partial cloning to selectively clone the\n> repository.\n>\n> Signed-off-by: Shourya Shukla <shouryashukla.oo@gmail.com>\n> ---\n> I wanted to ask why is there no mention of partial cloning in\n> the 'git-clone' documentation? Is it because it is an experimental\n> feature?\n\nIf the folks that have been pushing the feature haven't bothered to\ndocument it fully, by definition, it must be a work in progress that\nis not ready for the prime time ;-)\n\nJokes aside, the --filter=<filter-spec> option is mentioned in the\ndocumentation and it says \"...is used for the partial clone filter\",\nwithout even defining what a \"partial clone filter\" really is.\n\nThe topic deserves its own subsection, between the \"Git URLs\" and\nthe \"Examples\" sections, in git-clone(1).\n\n>  Documentation/gitfaq.txt | 10 ++++++++++\n>  1 file changed, 10 insertions(+)\n>\n> diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> index 7d294306f9..6f32846e3d 100644\n> --- a/Documentation/gitfaq.txt\n> +++ b/Documentation/gitfaq.txt\n> @@ -243,6 +243,16 @@ I want to change the remote of my repository. How do I do that?::\n>  One can list the remotes of a repository using `git remote -v` command.\n>  The default name of a remote is 'origin'.\n>  \n> +[[shallow-cloning]]\n> +The repository I am trying to clone is too big. Is there an alternative\n> +way of cloning it in lesser space?::\n> +\tA good way to save up space when cloning a repository is\n> +\tby using `partial clones`. A partial clone will clone the\n> +\tfull history of the repository but will skip out the entities\n> +\tspecified by the `--filter` option one uses in `git clone`.\n> +\tAny entity which has not been cloned to save space can be cloned\n> +\ton-demand. See linkgit:partial-clone[1].\n\nWhere does this link go?\n"},{"id":"396575","messageId":"xmqq368mxl9x.fsf@gitster.c.googlers.com","threadId":"53348","inReplyTo":"CABPp-BFt_5-OyOw9YbYJhhu1P4CJLOi65wdyRckOY5_acRejGg@mail.gmail.com","subject":"Re: [PATCH v4 4/4] gitfaq: fetching and pulling a repository","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-29T17:19:06Z","receivedAt":"2020-04-29T17:19:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elijah Newren <newren@gmail.com> writes:\n\n>> +       go smoothly or have merge conflicts depending on the case. A pull\n>> +       does not allow you to review any changes made upstream but rather\n>> +       merge those changes on their own.\n>\n> I don't understand this last sentence.  You can definitely review\n> changes made upstream after a pull; e.g. git log @{u}@{1}..@{u}\n>\n>> ++\n>> +This is the reason why it is sometimes advised to fetch the changes\n>> +first and then merge them accordingly because not every change might\n>> +be of utility to the user.\n>\n> I don't understand the purpose of this paragraph.\n\nReaders who need to resort to a FAQ will be at loss when told \"it is\nsometimes advised to...\", as they do not know enough to judge if the\nadvice applies to their situation themselves.\n\nDon't we have a workflow document?  Not the one that documents the\nworkflow I use to maintain this project, but outlines various ways\ndifferent projects work, describing centralized, triangular, merging\nand rebasing, etc.?  I do not think this single entry belongs to a\nFAQ list that gives simple answers to common questions without\npeople having to think.  Similar to the \"merge or rebase?\" question\n(not part of this series), it belongs to \"workflow guide\", \"concepts\nmanual\", and \"tutorial\" kind of document, I would think.\n\n\n"},{"id":"396810","messageId":"20200502050055.GA5582@konoha","threadId":"53348","inReplyTo":"CABPp-BG2zf8w6ouK3nn8bid_HKWh2g6Gu-UB65q3Z9V2D80X7A@mail.gmail.com","subject":"Re: [PATCH v4 3/4] gitfaq: shallow cloning a repository","fromName":"Shourya Shukla","fromEmail":"shouryashukla.oo@gmail.com","sentAt":"2020-05-02T05:00:55Z","receivedAt":"2020-05-02T05:01:03Z","isPatch":true,"sender":{"key":"shouryashukla.oo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43680618?v=4"},"body":"On 29/04 09:00, Elijah Newren wrote:\n> > diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> > index 7d294306f9..6f32846e3d 100644\n> > --- a/Documentation/gitfaq.txt\n> > +++ b/Documentation/gitfaq.txt\n> > @@ -243,6 +243,16 @@ I want to change the remote of my repository. How do I do that?::\n> >  One can list the remotes of a repository using `git remote -v` command.\n> >  The default name of a remote is 'origin'.\n> >\n> > +[[shallow-cloning]]\n> \n> Why is this marked as \"shallow-cloning\"?\n\nI forgot to change the heading, will fix it right away.\n\n> > +The repository I am trying to clone is too big. Is there an alternative\n> > +way of cloning it in lesser space?::\n> > +       A good way to save up space when cloning a repository is\n> \n> \"save space\" instead of \"save up space\"?\n\nSure.\n\n> > +       by using `partial clones`. A partial clone will clone the\n> > +       full history of the repository but will skip out the entities\n> > +       specified by the `--filter` option one uses in `git clone`.\n> > +       Any entity which has not been cloned to save space can be cloned\n> > +       on-demand. See linkgit:partial-clone[1].\n> > +\n> \n> I like this much better than suggesting shallow clones, though you\n> should mention that partial clones (currently?) presume that you have\n> an always-on network connection to the original repository because\n> subsequent commands may need to fetch additional objects in order to\n> complete.\n\nAlright, I will add that. Thank you for the review :)\n"},{"id":"396812","messageId":"20200502061355.GB5582@konoha","threadId":"53348","inReplyTo":"xmqq7dxyxlpj.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v4 3/4] gitfaq: shallow cloning a repository","fromName":"Shourya Shukla","fromEmail":"shouryashukla.oo@gmail.com","sentAt":"2020-05-02T06:13:55Z","receivedAt":"2020-05-02T06:14:46Z","isPatch":true,"sender":{"key":"shouryashukla.oo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43680618?v=4"},"body":"On 29/04 10:09, Junio C Hamano wrote:\n> > ---\n> > I wanted to ask why is there no mention of partial cloning in\n> > the 'git-clone' documentation? Is it because it is an experimental\n> > feature?\n> \n> If the folks that have been pushing the feature haven't bothered to\n> document it fully, by definition, it must be a work in progress that\n> is not ready for the prime time ;-)\n> \n> Jokes aside, the --filter=<filter-spec> option is mentioned in the\n> documentation and it says \"...is used for the partial clone filter\",\n> without even defining what a \"partial clone filter\" really is.\n> \n> The topic deserves its own subsection, between the \"Git URLs\" and\n> the \"Examples\" sections, in git-clone(1).\n\nMay I try to add it? If yes then are there any points to be kept in mind\nwhile writing this part (for eg., length of the subsection, writing\nstyle, what all is to be written etc.)?\n> \n> >  Documentation/gitfaq.txt | 10 ++++++++++\n> >  1 file changed, 10 insertions(+)\n> >\n> > diff --git a/Documentation/gitfaq.txt b/Documentation/gitfaq.txt\n> > index 7d294306f9..6f32846e3d 100644\n> > --- a/Documentation/gitfaq.txt\n> > +++ b/Documentation/gitfaq.txt\n> > @@ -243,6 +243,16 @@ I want to change the remote of my repository. How do I do that?::\n> >  One can list the remotes of a repository using `git remote -v` command.\n> >  The default name of a remote is 'origin'.\n> >  \n> > +[[shallow-cloning]]\n> > +The repository I am trying to clone is too big. Is there an alternative\n> > +way of cloning it in lesser space?::\n> > +\tA good way to save up space when cloning a repository is\n> > +\tby using `partial clones`. A partial clone will clone the\n> > +\tfull history of the repository but will skip out the entities\n> > +\tspecified by the `--filter` option one uses in `git clone`.\n> > +\tAny entity which has not been cloned to save space can be cloned\n> > +\ton-demand. See linkgit:partial-clone[1].\n> \n> Where does this link go?\n\nActually I intended to link to this page:\nhttps://git-scm.com/docs/partial-clone\n\nDo we link such pages in a manner different from linking command\ndocumentations? Also, lets say I want to link this section using\ngitlink:\nhttps://git-scm.com/docs/git-clone#_git_urls\n\nDo we change the number in 'linkgit:git-clone[n]'? If yes, then how do\nwe decide that number?\n"},{"id":"396813","messageId":"20200502063624.GC5582@konoha","threadId":"53348","inReplyTo":"CABPp-BGkZOyyoFiK3hsJ3FQq8MEBPy5aganHjA66vKFE20Wk0Q@mail.gmail.com","subject":"Re: [PATCH v4 1/4] gitfaq: files in .gitignore are tracked","fromName":"Shourya Shukla","fromEmail":"shouryashukla.oo@gmail.com","sentAt":"2020-05-02T06:36:24Z","receivedAt":"2020-05-02T06:36:33Z","isPatch":true,"sender":{"key":"shouryashukla.oo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43680618?v=4"},"body":"On 29/04 09:16, Elijah Newren wrote: \n> Mostly looks good, but I can't help but nitpick several small items:\n> The first sentence alone seems to slightly undercut the answer, so\n> it'd be nice to make sure the first two sentences are just one.  Also,\n> it doesn't explain how people get into this state, which is probably\n> something users are curious about.  The \"To ignore and untrack the\n> files\" lists multiple end results, making it unclear which parts of\n> the end results the suggested steps are addressing.  There's also a\n> \"staging are\" typo (should be \"staging area\").\n> \n> How about something like:\n> \n> The purpose of gitignore files is to ensure that certain files not\n> tracked by Git remain untracked.  However, git allows people to\n> override the `gitignore` rules by using the --force option to `git\n> add`, and sometimes people started tracking a file unintentionally\n> before adding a pattern covering it to the gitignore rules.  If you\n> want to untrack a file, run `git rm --cached <file>` (and then\n> commit).  See linkgit:gitignore[5] for details.\n\nThis seems better, will improve. :)\n"},{"id":"396814","messageId":"20200502065745.GD5582@konoha","threadId":"53348","inReplyTo":"CABPp-BFt_5-OyOw9YbYJhhu1P4CJLOi65wdyRckOY5_acRejGg@mail.gmail.com","subject":"Re: [PATCH v4 4/4] gitfaq: fetching and pulling a repository","fromName":"Shourya Shukla","fromEmail":"shouryashukla.oo@gmail.com","sentAt":"2020-05-02T06:57:45Z","receivedAt":"2020-05-02T07:00:35Z","isPatch":true,"sender":{"key":"shouryashukla.oo@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43680618?v=4"},"body":"On 29/04 08:56, Elijah Newren wrote:\n> > +[[fetching-and-pulling]]\n> > +How do I know if I want to do a fetch or a pull?::\n> > +       A fetch brings in the latest changes made upstream (i.e., the\n> > +       remote repository we are working on). This allows us to inspect\n> > +       the changes made upstream and integrate all those changes (if\n> > +       and only if we want to) or only cherry pick certain changes.\n> > +       Fetching does not have any immediate effects on the local\n> > +       repository.\n> \n> Maybe change that last sentence to \"Fetching does not modify the\n> current branch\"?  The local repository certainly gets bigger, and the\n> remote tracking branches are updated as well as their reflogs, and it\n> might trigger a gc, all of which sound like immediate effects to me.\n\nI meant changes in terms of the user's code. Yep you are right, I need\nto be precise here.\n\n> > +\n> > +       A pull is a wrapper for a fetch and merge. This means that doing\n> \n> ...for a fetch and merge or a fetch and rebase.  This means...\n> \n> > +       a `git pull` will not only fetch the changes made upstream but\n> > +       integrate them as well with our local repository. The merge may\n> \n> ...with our current branch.  The merge or rebase...\n> \n> > +       go smoothly or have merge conflicts depending on the case. A pull\n> > +       does not allow you to review any changes made upstream but rather\n> > +       merge those changes on their own.\n> \n> I don't understand this last sentence.  You can definitely review\n> changes made upstream after a pull; e.g. git log @{u}@{1}..@{u}\n\nI meant that the pull will apply the changes right away and one does not\nget the chance to review what is being applied before it has been\napplied (something a fetch does). I need to be more clear here,\nunderstood.\n\n> > ++\n> > +This is the reason why it is sometimes advised to fetch the changes\n> > +first and then merge them accordingly because not every change might\n> > +be of utility to the user.\n> \n> I don't understand the purpose of this paragraph.\n\nI intended to emphasise the difference between a fetch and a pull; the\nfact that fetch just brings in the changes from the remote and doesnot\napply them to our code/files right away, while a pull does so.\n\nAlso, a nit but, we are supposed to use 1 SP or 2 SP after a full\nstop(.)? In India we use 1 SP, is it different in other countries?\n"},{"id":"396841","messageId":"CABPp-BGrsw1V3gUWN40DTRCPBD5ZD5kvoqdjMuEJtJKCni09_w@mail.gmail.com","threadId":"53348","inReplyTo":"20200502065745.GD5582@konoha","subject":"Re: [PATCH v4 4/4] gitfaq: fetching and pulling a repository","fromName":"Elijah Newren","fromEmail":"newren@gmail.com","sentAt":"2020-05-02T19:00:36Z","receivedAt":"2020-05-02T19:00:51Z","isPatch":true,"sender":{"key":"newren@gmail.com","avatar":"https://avatars.githubusercontent.com/u/5455730?v=4"},"body":"Hi Shourya,\n\nOn Fri, May 1, 2020 at 11:57 PM Shourya Shukla\n<shouryashukla.oo@gmail.com> wrote:\n>\n> On 29/04 08:56, Elijah Newren wrote:\n> > > +[[fetching-and-pulling]]\n> > > +How do I know if I want to do a fetch or a pull?::\n> > > +       A fetch brings in the latest changes made upstream (i.e., the\n> > > +       remote repository we are working on). This allows us to inspect\n> > > +       the changes made upstream and integrate all those changes (if\n> > > +       and only if we want to) or only cherry pick certain changes.\n> > > +       Fetching does not have any immediate effects on the local\n> > > +       repository.\n> >\n> > Maybe change that last sentence to \"Fetching does not modify the\n> > current branch\"?  The local repository certainly gets bigger, and the\n> > remote tracking branches are updated as well as their reflogs, and it\n> > might trigger a gc, all of which sound like immediate effects to me.\n>\n> I meant changes in terms of the user's code. Yep you are right, I need\n> to be precise here.\n>\n> > > +\n> > > +       A pull is a wrapper for a fetch and merge. This means that doing\n> >\n> > ...for a fetch and merge or a fetch and rebase.  This means...\n> >\n> > > +       a `git pull` will not only fetch the changes made upstream but\n> > > +       integrate them as well with our local repository. The merge may\n> >\n> > ...with our current branch.  The merge or rebase...\n> >\n> > > +       go smoothly or have merge conflicts depending on the case. A pull\n> > > +       does not allow you to review any changes made upstream but rather\n> > > +       merge those changes on their own.\n> >\n> > I don't understand this last sentence.  You can definitely review\n> > changes made upstream after a pull; e.g. git log @{u}@{1}..@{u}\n>\n> I meant that the pull will apply the changes right away and one does not\n> get the chance to review what is being applied before it has been\n> applied (something a fetch does). I need to be more clear here,\n> understood.\n>\n> > > ++\n> > > +This is the reason why it is sometimes advised to fetch the changes\n> > > +first and then merge them accordingly because not every change might\n> > > +be of utility to the user.\n> >\n> > I don't understand the purpose of this paragraph.\n>\n> I intended to emphasise the difference between a fetch and a pull; the\n> fact that fetch just brings in the changes from the remote and doesnot\n> apply them to our code/files right away, while a pull does so.\n\nSo, perhaps we can shorten all three paragraphs to something like the following?\n\nA fetch stores a copy of the latest changes from the remote\nrepository, without modifying the working tree or current branch.  You\ncan then at your leisure inspect, merge, rebase on top of, or ignore\nthe upstream changes.  A pull consists of a fetch followed immediately\nby either a merge or rebase.\n\n> Also, a nit but, we are supposed to use 1 SP or 2 SP after a full\n> stop(.)? In India we use 1 SP, is it different in other countries?\n\nAh, the never ending spacing debate...\n\nThere may be variation country-to-country, but I doubt it's country\nspecific.  It's more a raging debate based on the fact that \"official\"\nrules have changed multiple times, old habits die hard, different\ncontexts exist for different audiences, and various other wrinkles.\n(\"official\" needs quotes because it's not clear who the authority on\npublishing, writing, or style is.  There are multiple out there.  But\neven if you pick a fairly commonly quoted authority, such as the\nChicago manual of style, they've had at least three different rules\nfor how much space to use after the full stop over time.)\n\nIf you use a typesetting program like LaTeX, the amount of space you\nuse in the source is irrelevant as the target will automatically be\ngenerated with the right amount according to whatever ruleset is in\nplay (you just need to be careful to specify when periods are used in\nabbreviations versus at ends of sentences).  But if you are using a\nWYSIWYG document or a plain text document for both generation and\nconsumption of the information, then some kind of rule is needed.\n\nFixed width versus proportional fonts also matter.  The two space rule\narose in the age of typewriters, which came about during the era when\nlarger spaces between sentences was the typesetting rule, and was\ntranslated into a two-space rule.  Many of the one-space rules and\nrule changes arose among those assuming everything would be using\nvariable width fonts[1].  Unless you're crazy[2], source code remains\nfixed width and emails on mailing lists like git@vger often are too\n(whenever someone sends a table as part of a commit message or just in\ndiscussion, attempting to read it in a proportional font is\nimpossible; gmail is atrocious and a crime against humanity here but\nluckily I can just go over to lore.kernel.org/git to read the emails\nin a fixed width font).\n\nThere does seem to be emerging consensus among many style guides\n(which come from those that just outright assume that variable width\nfonts are the only kind that exist anymore) that just one space should\nbe used, though it appears to be at least partially because one space\nis easy for editors to enforce[3]. (Switching from two spaces to one\nis a simple search and replace, whereas switching from one space to\ntwo is really hard because you have to know whether a period ends an\nabbreviation like \"Dr.\" or ends a sentence.)  The emerging style rules\nalso exist despite a (recent-ish) study showing that two spaces\nslightly aids reading speed[4].\n\nPersonally, I still remember using a single space after sentences, and\nmy dad standing over my shoulder and letting me know that it was WRONG\nto do that and that sentences should be followed by two spaces.  25\nyears later, it's an ingrained habit.  But the fact that I spend most\nof my time in an environment that most the style guides presume no\nlonger exists or is used (namely fixed width fonts, as found with\nsource code), means that I've got a good argument that the conventions\nused back in the days of typewriters are the ones that are actually\ncorrect within my context.  Plus there's actually a scientific study\nthat just conveniently happens to match my habit, so now I can claim\nthat I've been right all along these past 25 years; in the end, that's\nall that really matters anyway.  ;-)\n\n[1] https://slate.com/technology/2011/01/two-spaces-after-a-period-why-you-should-never-ever-do-it.html\n[2] https://twitter.com/rob_pike/status/567476552187641856?lang=en\n[3] https://cmosshoptalk.com/2020/03/24/one-space-or-two/\n[4] https://link.springer.com/article/10.3758/s13414-018-1527-6\n"},{"id":"396854","messageId":"xmqqftchkext.fsf@gitster.c.googlers.com","threadId":"53348","inReplyTo":"CABPp-BGrsw1V3gUWN40DTRCPBD5ZD5kvoqdjMuEJtJKCni09_w@mail.gmail.com","subject":"Re: [PATCH v4 4/4] gitfaq: fetching and pulling a repository","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-05-03T01:03:26Z","receivedAt":"2020-05-03T01:07:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Elijah Newren <newren@gmail.com> writes:\n\n>> Also, a nit but, we are supposed to use 1 SP or 2 SP after a full\n>> stop(.)? In India we use 1 SP, is it different in other countries?\n>\n> Ah, the never ending spacing debate...\n>\n> There may be variation country-to-country, but I doubt it's country\n> specific.  It's more a raging debate based on the fact that \"official\"\n> rules have changed multiple times, old habits die hard, different\n> contexts exist for different audiences, and various other wrinkles.\n\nhttps://www.theverge.com/2020/4/24/21234170 ;-)\n\nSince very old days of print media until now and well into the\nfuture, readers want to see longer whitespace after the end of each\nsentence than whitespace between words.  Behaviour of programs that\nthat take your \"text file\" as its input and produces rendered output\ndiffer.  Some ignore the number of spaces after the full-stop and\n\"do the right thing\" its output (that's the norm for typesetting\nsystems), and others want to see only one space there, and leaves\nmore swhitespace than optimal if you put two or more (which is often\nhow WYSIWYG word processors work).\n\nThe ideal would be to keep both the source text file and rendered\noutput pleasant to the eyes, and that means we type two spaces after\nthe end of a sentence in the source (which is meant to be read in\nmonospace text) and we avoid formatting programs that break (i.e.\nproduce more spaces than desirable) when fed more than one space\nafter each sentence (otherwise, we would be forced to use only one\nspace and hurt our eyes).\n\nI think our arrangement to go from source text through AsciiDoc or\nAsciidoctor to manpage or XHTML produces the right output with two\nspaces, so we are good.\n"},{"id":"396919","messageId":"xmqqzhanhehd.fsf@gitster.c.googlers.com","threadId":"53348","inReplyTo":"20200502061355.GB5582@konoha","subject":"Re: [PATCH v4 3/4] gitfaq: shallow cloning a repository","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-05-04T16:06:06Z","receivedAt":"2020-05-04T16:06:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Shourya Shukla <shouryashukla.oo@gmail.com> writes:\n\n> On 29/04 10:09, Junio C Hamano wrote:\n>> > ---\n>> > I wanted to ask why is there no mention of partial cloning in\n>> > the 'git-clone' documentation? Is it because it is an experimental\n>> > feature?\n>> \n>> If the folks that have been pushing the feature haven't bothered to\n>> document it fully, by definition, it must be a work in progress that\n>> is not ready for the prime time ;-)\n>> \n>> Jokes aside, the --filter=<filter-spec> option is mentioned in the\n>> documentation and it says \"...is used for the partial clone filter\",\n>> without even defining what a \"partial clone filter\" really is.\n>> \n>> The topic deserves its own subsection, between the \"Git URLs\" and\n>> the \"Examples\" sections, in git-clone(1).\n>\n> May I try to add it? If yes then are there any points to be kept in mind\n> while writing this part (for eg., length of the subsection, writing\n> style, what all is to be written etc.)?\n\nI am much less qualified to answer these questions than others on\nthe CC: list.\n\nWho added the mention to --filter and \"used for the partial clone filter\"\nto the page anyway?  Did you run \"git blame\" to find out?\n\n    ... goes and looks ...\n\nIt was added by 4a465443 (clone: document --filter options, 2020-03-22).\n\nDerrick, perhaps you can help Shourya to find a good place to give\na birds-eye description for the partial-clone feature and figure out\nwhat points about the feature are worth covering there?\n\nThanks.\n\n"},{"id":"397085","messageId":"7e11d316-f8d6-3921-f1a6-026584d9291d@gmail.com","threadId":"53348","inReplyTo":"xmqqzhanhehd.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v4 3/4] gitfaq: shallow cloning a repository","fromName":"Derrick Stolee","fromEmail":"stolee@gmail.com","sentAt":"2020-05-05T12:26:08Z","receivedAt":"2020-05-05T12:26:14Z","isPatch":true,"sender":{"key":"stolee@gmail.com","avatar":"https://avatars.githubusercontent.com/u/570044?v=4"},"body":"On 5/4/2020 12:06 PM, Junio C Hamano wrote:\n> Shourya Shukla <shouryashukla.oo@gmail.com> writes:\n> \n>> On 29/04 10:09, Junio C Hamano wrote:\n>>>> ---\n>>>> I wanted to ask why is there no mention of partial cloning in\n>>>> the 'git-clone' documentation? Is it because it is an experimental\n>>>> feature?\n>>>\n>>> If the folks that have been pushing the feature haven't bothered to\n>>> document it fully, by definition, it must be a work in progress that\n>>> is not ready for the prime time ;-)\n>>>\n>>> Jokes aside, the --filter=<filter-spec> option is mentioned in the\n>>> documentation and it says \"...is used for the partial clone filter\",\n>>> without even defining what a \"partial clone filter\" really is.\n>>>\n>>> The topic deserves its own subsection, between the \"Git URLs\" and\n>>> the \"Examples\" sections, in git-clone(1).\n>>\n>> May I try to add it? If yes then are there any points to be kept in mind\n>> while writing this part (for eg., length of the subsection, writing\n>> style, what all is to be written etc.)?\n> \n> I am much less qualified to answer these questions than others on\n> the CC: list.\n> \n> Who added the mention to --filter and \"used for the partial clone filter\"\n> to the page anyway?  Did you run \"git blame\" to find out?\n> \n>     ... goes and looks ...\n> \n> It was added by 4a465443 (clone: document --filter options, 2020-03-22).\n> \n> Derrick, perhaps you can help Shourya to find a good place to give\n> a birds-eye description for the partial-clone feature and figure out\n> what points about the feature are worth covering there?\n\nYes, in the series that added those options I requested help in\ndocumenting the partial clone. This was started in [1] but seems\nto have gone stale. \n\nCC'ing Dyrone to see where they are with this.\n\nShourya: would you be willing to help the patch [1] get finished?\nYou could probably incorporate it into this series (adding your\nsign-off). Let's see if Dyrone gets back to us.\n\nThanks,\n-Stolee\n\n[1] https://lore.kernel.org/git/c1a44a35095e7d681c312ecaa07c46e49f2fae67.1586791560.git.gitgitgadget@gmail.com/\n"},{"id":"423735","messageId":"CADMgQSSvU1vM_moe_cdjr_FzY_-kAM8LZ+T-pQMio=NpunZy6A@mail.gmail.com","threadId":"53348","inReplyTo":"7e11d316-f8d6-3921-f1a6-026584d9291d@gmail.com","subject":"Re: [PATCH v4 3/4] gitfaq: shallow cloning a repository","fromName":"dyrone teng","fromEmail":"dyroneteng@gmail.com","sentAt":"2021-05-06T02:49:25Z","receivedAt":"2021-05-06T02:49:39Z","isPatch":true,"sender":{"key":"dyroneteng@gmail.com","avatar":"https://avatars.githubusercontent.com/u/7803958?v=4"},"body":"Sorry, I was taking attention on other place and totally forgot that.\n\nI will restart to look into the patch again today\n\nDerrick Stolee <stolee@gmail.com> 于2020年5月5日周二 下午8:26写道：\n>\n> On 5/4/2020 12:06 PM, Junio C Hamano wrote:\n> > Shourya Shukla <shouryashukla.oo@gmail.com> writes:\n> >\n> >> On 29/04 10:09, Junio C Hamano wrote:\n> >>>> ---\n> >>>> I wanted to ask why is there no mention of partial cloning in\n> >>>> the 'git-clone' documentation? Is it because it is an experimental\n> >>>> feature?\n> >>>\n> >>> If the folks that have been pushing the feature haven't bothered to\n> >>> document it fully, by definition, it must be a work in progress that\n> >>> is not ready for the prime time ;-)\n> >>>\n> >>> Jokes aside, the --filter=<filter-spec> option is mentioned in the\n> >>> documentation and it says \"...is used for the partial clone filter\",\n> >>> without even defining what a \"partial clone filter\" really is.\n> >>>\n> >>> The topic deserves its own subsection, between the \"Git URLs\" and\n> >>> the \"Examples\" sections, in git-clone(1).\n> >>\n> >> May I try to add it? If yes then are there any points to be kept in mind\n> >> while writing this part (for eg., length of the subsection, writing\n> >> style, what all is to be written etc.)?\n> >\n> > I am much less qualified to answer these questions than others on\n> > the CC: list.\n> >\n> > Who added the mention to --filter and \"used for the partial clone filter\"\n> > to the page anyway?  Did you run \"git blame\" to find out?\n> >\n> >     ... goes and looks ...\n> >\n> > It was added by 4a465443 (clone: document --filter options, 2020-03-22).\n> >\n> > Derrick, perhaps you can help Shourya to find a good place to give\n> > a birds-eye description for the partial-clone feature and figure out\n> > what points about the feature are worth covering there?\n>\n> Yes, in the series that added those options I requested help in\n> documenting the partial clone. This was started in [1] but seems\n> to have gone stale.\n>\n> CC'ing Dyrone to see where they are with this.\n>\n> Shourya: would you be willing to help the patch [1] get finished?\n> You could probably incorporate it into this series (adding your\n> sign-off). Let's see if Dyrone gets back to us.\n>\n> Thanks,\n> -Stolee\n>\n> [1] https://lore.kernel.org/git/c1a44a35095e7d681c312ecaa07c46e49f2fae67.1586791560.git.gitgitgadget@gmail.com/\n"}]}