{"thread":{"id":"59431","subject":"Feature Request: Ignore Tracked IDE files","startedAt":"2023-03-21T19:49:42Z","lastAt":"2023-03-22T14:21:41Z","messageCount":5,"participants":["Ward Hopeman","Sean Allred"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"473879","messageId":"94EFF553-E498-46D9-B14A-3500FEDEBB47@nearearth.aero","threadId":"59431","inReplyTo":null,"subject":"Feature Request: Ignore Tracked IDE files","fromName":"Ward Hopeman","fromEmail":"ward.hopeman@nearearth.aero","sentAt":"2023-03-21T19:49:30Z","receivedAt":"2023-03-21T19:49:42Z","isPatch":false,"sender":{"key":"ward.hopeman@nearearth.aero","avatar":"https://gravatar.com/avatar/c70fd685af68c754a8585af2f963e69eee014b439a8c26929a4a6269657639d4?d=mp&s=160"},"body":"Hi,\n    I was unable to find this as a prior feature request, so I apologize if this is a duplicate request.\n\n    Request: Create an Ignore section that allows for minimal IDE inclusion without impacting IDE settings for local users.\n\n    Reason for the request: Most engineering teams share some IDE settings when working on code. More often than not, local IDE changes force engineers to resort to using \"git update-index --skip-worktree <file>” to avoid the IDE settings files from showing up. It would be nice to be able to identify IDE files that you want in the repository but not necessarily track all changes as most of them are not desired when individuals make those changes for local setup.But teams like to track and have available generic shareable configurations like tabs to space and line length etc. By making it a user configurable section of ignore it allows for future IDEs to be listed without impacting the way it works for common IDEs today. \n\n    Example workflow: \nTeam member Pat creates a new repository. \nPat sets up the default IDE settings file(s) the way the team “should” be using them, but only minimal settings like line length, tabs to spaces, etc. \nPat commits the IDEs settings file(s) (often a directory like .idea or .vscode) to the GIT repository. \nPat adds the IDE settings file to the IDE Ignore section of the .gitignore file. \nTeam member Sam checks out the repository. \nSam opens a local IDE and modifies settings that work for local items like executables etc. \nSam makes code changes. \nWhen running `git status` Sam sees a new status section for IDE changes like `untracked` files. \nSam executes `git add .` and the IDE changes are ignored.\nSam executes `git add -f .ide/settings.json` and the IDE changes are included (note specific file is identified not a general flag).\n\n\nThank you for your time,\nWard\n\n\n"},{"id":"473899","messageId":"m0o7ol6ta7.fsf@epic96565.epic.com","threadId":"59431","inReplyTo":"94EFF553-E498-46D9-B14A-3500FEDEBB47@nearearth.aero","subject":"Re: Feature Request: Ignore Tracked IDE files","fromName":"Sean Allred","fromEmail":"allred.sean@gmail.com","sentAt":"2023-03-22T09:10:26Z","receivedAt":"2023-03-22T09:15:55Z","isPatch":false,"sender":{"key":"allred.sean@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2082195?v=4"},"body":"\nWard Hopeman <ward.hopeman@nearearth.aero> writes:\n>     Request: Create an Ignore section that allows for minimal IDE\n>     inclusion without impacting IDE settings for local users.\n>\n>     Reason for the request: Most engineering teams share some IDE\n> settings when working on code. More often than not, local IDE changes\n> force engineers to resort to using \"git update-index --skip-worktree\n> <file>” to avoid the IDE settings files from showing up. It would be\n> nice to be able to identify IDE files that you want in the repository\n> but not necessarily track all changes as most of them are not desired\n> when individuals make those changes for local setup. But teams like to\n> track and have available generic shareable configurations like tabs to\n> space and line length etc. By making it a user configurable section of\n> ignore it allows for future IDEs to be listed without impacting the\n> way it works for common IDEs today.\n\nIt sounds like you are rather after 'public' vs 'private' IDE settings,\nwhich would be a feature of the IDE -- not of Git -- and it seems a far\nsimpler model. Public settings are checked-in, private settings are not,\nand private settings override public settings.\n\nThis is used by Visual Studio (IIRC) and possible in other tools (Emacs\nI know for sure, though I can't imagine VS Code doesn't have this\nconcept by now). It's even the model used by Git itself for some things\n(.gitignore vs. .git/info/exclude vs. core.excludesfile).\n\nAre these alternative approaches not an option?\n\n--\nSean Allred\n"},{"id":"473914","messageId":"ACA3ECE1-689A-4BFD-A8EE-9CFF30128C1C@nearearth.aero","threadId":"59431","inReplyTo":"m0o7ol6ta7.fsf@epic96565.epic.com","subject":"Re: Feature Request: Ignore Tracked IDE files","fromName":"Ward Hopeman","fromEmail":"ward.hopeman@nearearth.aero","sentAt":"2023-03-22T13:54:03Z","receivedAt":"2023-03-22T13:54:11Z","isPatch":false,"sender":{"key":"ward.hopeman@nearearth.aero","avatar":"https://gravatar.com/avatar/c70fd685af68c754a8585af2f963e69eee014b439a8c26929a4a6269657639d4?d=mp&s=160"},"body":"Hi Sean,\n   Thanks for the feedback. I had not considered that the IDEs the teams are using might already have that functionality built in. I thought I had hit the nail on the head, but I agree there appears to be an alternative available. I will pursue those configurations with the team.\n   I am curious if you think there is a class of files, under the paradigm I outlined; that need to be tracked initially but then ignored for regular workflows?  Just curious at this point if this was discussed / considered previously.\n\nThanks,\nWard\n>\n\n> On Mar 22, 2023, at 5:10 AM, Sean Allred <allred.sean@gmail.com> wrote:\n> \n> \n> Ward Hopeman <ward.hopeman@nearearth.aero> writes:\n>>    Request: Create an Ignore section that allows for minimal IDE\n>>    inclusion without impacting IDE settings for local users.\n>> \n>>    Reason for the request: Most engineering teams share some IDE\n>> settings when working on code. More often than not, local IDE changes\n>> force engineers to resort to using \"git update-index --skip-worktree\n>> <file>” to avoid the IDE settings files from showing up. It would be\n>> nice to be able to identify IDE files that you want in the repository\n>> but not necessarily track all changes as most of them are not desired\n>> when individuals make those changes for local setup. But teams like to\n>> track and have available generic shareable configurations like tabs to\n>> space and line length etc. By making it a user configurable section of\n>> ignore it allows for future IDEs to be listed without impacting the\n>> way it works for common IDEs today.\n> \n> It sounds like you are rather after 'public' vs 'private' IDE settings,\n> which would be a feature of the IDE -- not of Git -- and it seems a far\n> simpler model. Public settings are checked-in, private settings are not,\n> and private settings override public settings.\n> \n> This is used by Visual Studio (IIRC) and possible in other tools (Emacs\n> I know for sure, though I can't imagine VS Code doesn't have this\n> concept by now). It's even the model used by Git itself for some things\n> (.gitignore vs. .git/info/exclude vs. core.excludesfile).\n> \n> Are these alternative approaches not an option?\n> \n> --\n> Sean Allred\n\n"},{"id":"473916","messageId":"m0fs9w7upa.fsf@epic96565.epic.com","threadId":"59431","inReplyTo":"ACA3ECE1-689A-4BFD-A8EE-9CFF30128C1C@nearearth.aero","subject":"Re: Feature Request: Ignore Tracked IDE files","fromName":"Sean Allred","fromEmail":"allred.sean@gmail.com","sentAt":"2023-03-22T13:55:12Z","receivedAt":"2023-03-22T13:59:56Z","isPatch":false,"sender":{"key":"allred.sean@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2082195?v=4"},"body":"\nWard Hopeman <ward.hopeman@nearearth.aero> writes:\n> [...] but I agree there appears to be an alternative available. I will\n> pursue those configurations with the team.\n\nBest of luck! Managing settings across a team is always an 'interesting'\nexperience :-)\n\n> I am curious if you think there is a class of files, under the\n> paradigm I outlined; that need to be tracked initially but then\n> ignored for regular workflows? Just curious at this point if this was\n> discussed / considered previously.\n\nIt comes up every now and again, but in lieu of specific examples, it\nalways 'seems' to be the wrong approach. The Notes section of\ngit-update-index(1) talks about this a bit:\n\n> Users often try to use the assume-unchanged and skip-worktree bits to\n> tell Git to ignore changes to files that are tracked. This does not\n> work as expected, since Git may still check working tree files against\n> the index when performing certain operations. In general, Git does not\n> provide a way to ignore changes to tracked files, so alternate\n> solutions are recommended.\n>\n> For example, if the file you want to change is some sort of config\n> file, the repository can include a sample config file that can then be\n> copied into the ignored name and modified. The repository can even\n> include a script to treat the sample file as a template, modifying and\n> copying it automatically.\n\n--\nSean Allred\n"},{"id":"473917","messageId":"5C64C207-8CE4-4D42-A001-E473D827E99A@nearearth.aero","threadId":"59431","inReplyTo":"m0fs9w7upa.fsf@epic96565.epic.com","subject":"Re: Feature Request: Ignore Tracked IDE files","fromName":"Ward Hopeman","fromEmail":"ward.hopeman@nearearth.aero","sentAt":"2023-03-22T14:21:19Z","receivedAt":"2023-03-22T14:21:41Z","isPatch":false,"sender":{"key":"ward.hopeman@nearearth.aero","avatar":"https://gravatar.com/avatar/c70fd685af68c754a8585af2f963e69eee014b439a8c26929a4a6269657639d4?d=mp&s=160"},"body":"Thanks for the info Sean. \nBest regards,\nWard\n>\n\n> On Mar 22, 2023, at 9:55 AM, Sean Allred <allred.sean@gmail.com> wrote:\n> \n> \n> Ward Hopeman <ward.hopeman@nearearth.aero> writes:\n>> [...] but I agree there appears to be an alternative available. I will\n>> pursue those configurations with the team.\n> \n> Best of luck! Managing settings across a team is always an 'interesting'\n> experience :-)\n> \n>> I am curious if you think there is a class of files, under the\n>> paradigm I outlined; that need to be tracked initially but then\n>> ignored for regular workflows? Just curious at this point if this was\n>> discussed / considered previously.\n> \n> It comes up every now and again, but in lieu of specific examples, it\n> always 'seems' to be the wrong approach. The Notes section of\n> git-update-index(1) talks about this a bit:\n> \n>> Users often try to use the assume-unchanged and skip-worktree bits to\n>> tell Git to ignore changes to files that are tracked. This does not\n>> work as expected, since Git may still check working tree files against\n>> the index when performing certain operations. In general, Git does not\n>> provide a way to ignore changes to tracked files, so alternate\n>> solutions are recommended.\n>> \n>> For example, if the file you want to change is some sort of config\n>> file, the repository can include a sample config file that can then be\n>> copied into the ignored name and modified. The repository can even\n>> include a script to treat the sample file as a template, modifying and\n>> copying it automatically.\n> \n> --\n> Sean Allred\n\n"}]}