From: "Raúl Núñez de Arenas Coronado" <raulnac@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Elijah Newren <newren@gmail.com>,
Phillip Wood <phillip.wood@dunelm.org.uk>,
Sebastian Thiel <sebastian.thiel@icloud.com>
Subject: Re: Fwd: Unexpected behavior of ls-files command when using --others --exclude-from, and a .gitignore file which resides in a subdirectory
Date: Tue, 23 Jan 2024 07:08:32 +0100 [thread overview]
Message-ID: <CAGF1KhWEnbOy1DQhv4xbov5Fg+hQdihWcwcT9A0f1b4Fc1gR-w@mail.gmail.com> (raw)
In-Reply-To: <xmqq5xzlrqoi.fsf@gitster.g>
Hi Junio!
El lun, 22 ene 2024 a las 22:42, Junio C Hamano (<gitster@pobox.com>) escribió:
> We have been discussing to extend the mechanism so that we can have
> "precious" files, which also will be left out of the project (e.g.,
> "git add ." will not add to the index, just like an ignored file)
> but are not considered "expendable". If file F is "precious":
>
> - "git add ." will not add F to the index
>
> - "git status" will not say F is left untracked and can be added
>
> - "git clean -f" will not remove it.
>
> - checking out a branch with a tracked file F/G will *fail*, to
> prevent the loss of file.
And that is exactly the concept I'm handling here: files that should
not be tracked BUT that are not expendable. You explained it concisely
and perfectly :)))
I'll wait until that is implemented, and in the meantime I have a
couple solutions I want to try, like using .gitprecious files and 'git
ls-files --other --ignored --exclude-from=.gitprecious'. I have more
ideas.
Thanks a lot for the help and the explanation!
--
Raúl Núñez de Arenas Coronado
.
next prev parent reply other threads:[~2024-01-23 6:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGF1KhWNaO_TUuCPo2L_HzNnR+FnB1Q4H6_xQ2owoH+SnynzEg@mail.gmail.com>
2024-01-22 20:45 ` Fwd: Unexpected behavior of ls-files command when using --others --exclude-from, and a .gitignore file which resides in a subdirectory Raúl Núñez de Arenas Coronado
2024-01-22 20:52 ` Junio C Hamano
2024-01-22 21:07 ` Raúl Núñez de Arenas Coronado
2024-01-22 21:42 ` Junio C Hamano
2024-01-23 6:08 ` Raúl Núñez de Arenas Coronado [this message]
2024-01-22 21:34 ` Jeff King
2024-01-22 21:45 ` Junio C Hamano
2024-01-22 21:59 ` Jeff King
2024-01-24 2:58 ` Elijah Newren
2024-01-24 17:06 ` Junio C Hamano
2024-01-24 18:57 ` Jeff King
2024-01-23 5:40 ` Raúl Núñez de Arenas Coronado
2024-01-24 1:09 ` Jeff King
2024-01-24 14:22 ` Raúl Núñez de Arenas Coronado
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGF1KhWEnbOy1DQhv4xbov5Fg+hQdihWcwcT9A0f1b4Fc1gR-w@mail.gmail.com \
--to=raulnac@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=newren@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=sebastian.thiel@icloud.com \
/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.
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).