From: <rsbecker@nexbridge.com>
To: "'Clement Sello Tsetsa'" <clementsellotsetsa@gmail.com>,
<git@vger.kernel.org>
Subject: RE: Feature Request
Date: Thu, 20 Jun 2024 09:29:05 -0400 [thread overview]
Message-ID: <009e01dac315$d6399b40$82acd1c0$@nexbridge.com> (raw)
In-Reply-To: <CAOqo0cWd5BK5zAgMmsWPYFuWscLvuOq0Gq_a5PH-oXJoGrPb_w@mail.gmail.com>
On Thursday, June 20, 2024 8:58 AM. Clement Sello Tsetsa wrote:
>My name is Clement and I am a second year student at NWU university in South
>Africa studying towards a bachelor's degree in information technology, i just
>recently learned about Git and it is a fascinating piece of technology. This is my first
>time making a feature request for anything and please excuse me if it is not up to
>your standards in any way. Please read the below text as it is the feature request:
>
>When initializing a Git repository, allow specifying file types to track using the
>command git init <file>. If no file type is specified, Git should track all file types by
>default. Additionally, automatically create the .gitignore file during initialization, and
>as new file types are created, add them to the ignore list. Later, when adding files to
>the staging environment, Git will already know which types to include or ignore
>using the git add <file> command.
>
>I think the user should not have to create the .gitignore file in the future if this is
>implementable.
Can you clarify what you mean by "file types"? In a cross-platform distributed situation, file types can be interpreted as a combination of file extensions, file encodings, and internal contents. .gitignore only deals with name matching patterns, so cannot reflect inclusion of exclusion of internal content types (for example *.doc with UTF-8 vs. US-ASCII content).
This is an interesting idea but seems to require that git build a generic mechanism for determining file types on all supported platforms and extending .gitignore to represent internal types . This is definitely non-trivial. In Linux, for example, the 'file' command can determine the internal guts of some files, as in:
$ file myfile
myfile: TNS/X PIC object format,64-bit data model,executable,NonStop OSS target
Note that there is no file extension above.
Can you please clarify what you are looking for in this area?
I would also suggest that you look into both git templates and git hooks. The combination might help cover at least part of this. Specifically, the pre-commit hook might help with management of the .gitignore file.
Regards,
Randall
next prev parent reply other threads:[~2024-06-20 13:29 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 12:58 Feature Request Clement Sello Tsetsa
2024-06-20 13:29 ` rsbecker [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-10-27 21:55 feature request John Rood
2016-10-27 22:01 ` Stefan Beller
2016-10-27 22:05 ` John Rood
2016-10-27 22:24 ` John Rood
2016-10-27 22:27 ` Junio C Hamano
2016-10-27 22:48 ` John Rood
2016-10-27 22:51 ` Junio C Hamano
2016-10-27 23:16 ` John Rood
2016-10-27 22:30 ` Stefan Beller
2016-10-27 22:44 ` John Rood
2016-10-27 22:46 ` Junio C Hamano
2016-10-27 23:24 ` David Lang
2016-10-28 8:49 ` Johannes Schindelin
2016-10-28 12:54 ` Philip Oakley
2013-02-18 18:52 Jay Townsend
2013-02-18 19:54 ` James Nylen
2013-02-18 20:45 ` Jeff King
2013-02-19 3:26 ` Drew Northup
2013-02-19 22:27 ` Shawn Pearce
2012-10-16 11:36 Angelo Borsotti
2012-10-16 12:15 ` Andrew Ardill
2012-10-16 17:27 ` Angelo Borsotti
2012-10-16 23:30 ` Sitaram Chamarty
2012-10-17 0:00 ` Andrew Ardill
2012-10-16 13:34 ` Christian Thaeter
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='009e01dac315$d6399b40$82acd1c0$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=clementsellotsetsa@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.
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).