git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jaydeep Das <jaydeepjd.8914@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: A new feature command request `cmd_ignore`
Date: Sat, 15 Jan 2022 16:15:06 +0530	[thread overview]
Message-ID: <9a3837b4-8c67-e114-e977-f6c7b729ba45@gmail.com> (raw)
In-Reply-To: <5f6f1dba-a923-4bb9-70a7-4936566f46e0@kdbg.org>


> I think that is a paraphrase of the suggestion to

    git rm --cached settings
    echo settings >> .gitignore

> when changes to a file 'settings' that was already tracked (and often
> contains user-specific settings) should be ignored. This misguided and
> short-sighted "solution" is repeated numerous times on Stackoverflow.
> Not something that we should encourage.

So what should be done in this scenario? And why is it a discouraged and 
misguided thing?


On 1/15/22 14:33, Johannes Sixt wrote:
> Am 15.01.22 um 06:17 schrieb Elijah Newren:
>> On Fri, Jan 14, 2022 at 3:03 PM Jaydeep Das <jaydeepjd.8914@gmail.com> wrote:
>>> and other parameters like `--force`
>>> could be added which would delete that file cache if that
>>> file was already committed.
>> I don't understand what you mean by this.
> I think that is a paraphrase of the suggestion to
>
>     git rm --cached settings
>     echo settings >> .gitignore
>
> when changes to a file 'settings' that was already tracked (and often
> contains user-specific settings) should be ignored. This misguided and
> short-sighted "solution" is repeated numerous times on Stackoverflow.
> Not something that we should encourage.
>
> -- Hannes

  reply	other threads:[~2022-01-15 10:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-14 18:58 A new feature command request `cmd_ignore` Jaydeep Das
2022-01-15  5:17 ` Elijah Newren
2022-01-15  9:03   ` Johannes Sixt
2022-01-15 10:45     ` Jaydeep Das [this message]
2022-01-15 15:38       ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a3837b4-8c67-e114-e977-f6c7b729ba45@gmail.com \
    --to=jaydeepjd.8914@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).