{"thread":{"id":"61655","subject":"Feature Request","startedAt":"2024-06-20T12:58:40Z","lastAt":"2024-06-20T13:29:15Z","messageCount":2,"participants":["Clement Sello Tsetsa","rsbecker@nexbridge.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"497398","messageId":"CAOqo0cWd5BK5zAgMmsWPYFuWscLvuOq0Gq_a5PH-oXJoGrPb_w@mail.gmail.com","threadId":"61655","inReplyTo":null,"subject":"Feature Request","fromName":"Clement Sello Tsetsa","fromEmail":"clementsellotsetsa@gmail.com","sentAt":"2024-06-20T12:58:27Z","receivedAt":"2024-06-20T12:58:40Z","isPatch":false,"sender":{"key":"clementsellotsetsa@gmail.com","avatar":null},"body":"Greetings;\n\nMy name is Clement and I am a second year student at NWU university in\nSouth Africa studying towards a bachelor's degree in information\ntechnology, i just recently learned about Git and it is a fascinating\npiece of technology. This is my first time making a feature request\nfor anything and please excuse me if it is not up to your standards in\nany way. Please read the below text as it is the feature request:\n\nWhen initializing a Git repository, allow specifying file types to\ntrack using the command git init <file>. If no file type is specified,\nGit should track all file types by default. Additionally,\nautomatically create the .gitignore file during initialization, and as\nnew file types are created, add them to the ignore list. Later, when\nadding files to the staging environment, Git will already know which\ntypes to include or ignore using the git add <file> command.\n\nI think the user should not have to create the .gitignore file in the\nfuture if this is implementable.\n\nKind regards\nCS Tsetsa\n"},{"id":"497400","messageId":"009e01dac315$d6399b40$82acd1c0$@nexbridge.com","threadId":"61655","inReplyTo":"CAOqo0cWd5BK5zAgMmsWPYFuWscLvuOq0Gq_a5PH-oXJoGrPb_w@mail.gmail.com","subject":"RE: Feature Request","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2024-06-20T13:29:05Z","receivedAt":"2024-06-20T13:29:15Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On Thursday, June 20, 2024 8:58 AM. Clement Sello Tsetsa wrote:\n>My name is Clement and I am a second year student at NWU university in South\n>Africa studying towards a bachelor's degree in information technology, i just\n>recently learned about Git and it is a fascinating piece of technology. This is my first\n>time making a feature request for anything and please excuse me if it is not up to\n>your standards in any way. Please read the below text as it is the feature request:\n>\n>When initializing a Git repository, allow specifying file types to track using the\n>command git init <file>. If no file type is specified, Git should track all file types by\n>default. Additionally, automatically create the .gitignore file during initialization, and\n>as new file types are created, add them to the ignore list. Later, when adding files to\n>the staging environment, Git will already know which types to include or ignore\n>using the git add <file> command.\n>\n>I think the user should not have to create the .gitignore file in the future if this is\n>implementable.\n\nCan 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).\n\nThis 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:\n\n$ file myfile\nmyfile:    TNS/X PIC object format,64-bit data model,executable,NonStop OSS target\n\nNote that there is no file extension above.\n\nCan you please clarify what you are looking for in this area?\n\nI 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.\n\nRegards,\nRandall\n\n"}]}