git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] docs: clarify git rm --cached function in gitignore note
@ 2020-10-05  8:58 Sohom Datta via GitGitGadget
  2023-05-03  0:09 ` Sohom
  2023-05-03 15:31 ` [PATCH v2] " Sohom Datta via GitGitGadget
  0 siblings, 2 replies; 7+ messages in thread
From: Sohom Datta via GitGitGadget @ 2020-10-05  8:58 UTC (permalink / raw)
  To: git; +Cc: Sohom Datta, Sohom

From: Sohom <sohom.datta@learner.manipal.edu>

Added text explaining that the git rm --cached command
isn't analogous to the gitignore file and that the file
will need to be added to gitignore to prevent later
commits from adding the file back.

Signed-off-by: Sohom Datta <sohom.datta@learner.manipal.edu>
---
    docs: Clarify git rm --cached function in gitignore note
    
    Added text explaining that the git rm --cached command isn't analogous
    to the gitignore file and that the file will need to be added to 
    gitignore to prevent later commits from adding the file back.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-862%2Fsohomdatta1%2Fgitignore-note-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-862/sohomdatta1/gitignore-note-v1
Pull-Request: https://github.com/git/git/pull/862

 Documentation/gitignore.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
index d47b1ae296..22d58df805 100644
--- a/Documentation/gitignore.txt
+++ b/Documentation/gitignore.txt
@@ -147,7 +147,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.
 
 EXAMPLES
 --------

base-commit: ab4691b67bc1a2cd8d9068fb03e3fbd6979247d6
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-05-07  1:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05  8:58 [PATCH] docs: clarify git rm --cached function in gitignore note Sohom Datta via GitGitGadget
2023-05-03  0:09 ` Sohom
2023-05-03  4:32   ` Elijah Newren
2023-05-03 15:31 ` [PATCH v2] " Sohom Datta via GitGitGadget
2023-05-03 17:06   ` Junio C Hamano
2023-05-03 21:46   ` [PATCH v3] " Sohom Datta via GitGitGadget
2023-05-07  1:36     ` Elijah Newren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).