git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] docs: clarify git rm --cached function in gitignore note

From
Elijah Newren <newren@gmail.com>
Date
May 7, 2023, 01:36 UTC
Message-ID
<CABPp-BEu6F1KYq8vHjypc470HH0fu-4DR6jXogAP=zY1jGNEXg@mail.gmail.com>
In-Reply-To
<pull.862.v3.git.git.1683150400953.gitgitgadget@gmail.com>

On Wed, May 3, 2023 at 2:46 PM Sohom Datta via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 68 quoted lines
>
> From: Sohom Datta <sohom.datta@learner.manipal.edu>
>
> Explain to users that the step to untrack a file will not also prevent them
> from getting added in the future.
>
> Signed-off-by: Sohom Datta <sohom.datta@learner.manipal.edu>
> ---
>     docs: Clarify git rm --cached function in gitignore note
>
>     I've fixed the Sign-Off v/s commit author issue and incorporated the
>     changes suggested :)
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-862%2Fsohomdatta1%2Fgitignore-note-v3
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-862/sohomdatta1/gitignore-note-v3
> Pull-Request: https://github.com/git/git/pull/862
>
> Range-diff vs v2:
>
>  1:  c3257398c8f ! 1:  ae09ff2e70c docs: clarify git rm --cached function in gitignore note
>      @@
>        ## Metadata ##
>      -Author: Sohom <sohom.datta@learner.manipal.edu>
>      +Author: Sohom Datta <sohom.datta@learner.manipal.edu>
>
>        ## Commit message ##
>           docs: clarify git rm --cached function in gitignore note
>
>      -    Explain to users that the step to untrack a file will not also keep it
>      -    untracked in the future.
>      +    Explain to users that the step to untrack a file will not also prevent them
>      +    from getting added in the future.
>
>           Signed-off-by: Sohom Datta <sohom.datta@learner.manipal.edu>
>
>      @@ Documentation/gitignore.txt: The purpose of gitignore files is to ensure that ce
>        To stop tracking a file that is currently tracked, use
>       -'git rm --cached'.
>       +'git rm --cached' to remove the file from the index. The filename
>      -+can then be added to the `gitignore` file to stop the file from
>      ++can then be added to the `.gitignore` file to stop the file from
>       +being reintroduced in later commits.
>
>        Git does not follow symbolic links when accessing a `.gitignore` file in
>
>
>  Documentation/gitignore.txt | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
> index f2738b10db6..4c17f2356c4 100644
> --- a/Documentation/gitignore.txt
> +++ b/Documentation/gitignore.txt
> @@ -146,7 +146,9 @@ The purpose of gitignore files is to ensure that certain files
>  not tracked by Git remain untracked.
>
>  To stop tracking a file that is currently tracked, use
> -'git rm --cached'.
> +'git rm --cached' to remove the file from the index. The filename
> +can then be added to the `.gitignore` file to stop the file from
> +being reintroduced in later commits.
>
>  Git does not follow symbolic links when accessing a `.gitignore` file in
>  the working tree. This keeps behavior consistent when the file is
>
> base-commit: 69c786637d7a7fe3b2b8f7d989af095f5f49c3a8
> --
> gitgitgadget
v3 looks good to me:
Reviewed-by: Elijah Newren <newren@gmail.com>
Previous: Sohom Datta via GitGitGadget
Message 7 of 7 in “docs: clarify git rm --cached function in gitignore note”
  1. docs: clarify git rm --cached function in gitignore noteSohom Datta via GitGitGadget, Oct 5, 2020
  2. SohomMay 3, 2023
  3. Elijah NewrenMay 3, 2023
  4. docs: clarify git rm --cached function in gitignore noteSohom Datta via GitGitGadget, May 3, 2023
  5. Junio C HamanoMay 3, 2023
  6. docs: clarify git rm --cached function in gitignore noteSohom Datta via GitGitGadget, May 3, 2023
  7. Elijah NewrenMay 7, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.