public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* Feature Request: Ignore Tracked IDE files
@ 2023-03-21 19:49 Ward Hopeman
  2023-03-22  9:10 ` Sean Allred
  0 siblings, 1 reply; 5+ messages in thread
From: Ward Hopeman @ 2023-03-21 19:49 UTC (permalink / raw)
  To: git

Hi,
    I was unable to find this as a prior feature request, so I apologize if this is a duplicate request.

    Request: Create an Ignore section that allows for minimal IDE inclusion without impacting IDE settings for local users.

    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. 

    Example workflow: 
Team member Pat creates a new repository. 
Pat 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. 
Pat commits the IDEs settings file(s) (often a directory like .idea or .vscode) to the GIT repository. 
Pat adds the IDE settings file to the IDE Ignore section of the .gitignore file. 
Team member Sam checks out the repository. 
Sam opens a local IDE and modifies settings that work for local items like executables etc. 
Sam makes code changes. 
When running `git status` Sam sees a new status section for IDE changes like `untracked` files. 
Sam executes `git add .` and the IDE changes are ignored.
Sam executes `git add -f .ide/settings.json` and the IDE changes are included (note specific file is identified not a general flag).


Thank you for your time,
Ward



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature Request: Ignore Tracked IDE files
  2023-03-21 19:49 Feature Request: Ignore Tracked IDE files Ward Hopeman
@ 2023-03-22  9:10 ` Sean Allred
  2023-03-22 13:54   ` Ward Hopeman
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Allred @ 2023-03-22  9:10 UTC (permalink / raw)
  To: Ward Hopeman; +Cc: git


Ward Hopeman <ward.hopeman@nearearth•aero> writes:
>     Request: Create an Ignore section that allows for minimal IDE
>     inclusion without impacting IDE settings for local users.
>
>     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.

It sounds like you are rather after 'public' vs 'private' IDE settings,
which would be a feature of the IDE -- not of Git -- and it seems a far
simpler model. Public settings are checked-in, private settings are not,
and private settings override public settings.

This is used by Visual Studio (IIRC) and possible in other tools (Emacs
I know for sure, though I can't imagine VS Code doesn't have this
concept by now). It's even the model used by Git itself for some things
(.gitignore vs. .git/info/exclude vs. core.excludesfile).

Are these alternative approaches not an option?

--
Sean Allred

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature Request: Ignore Tracked IDE files
  2023-03-22  9:10 ` Sean Allred
@ 2023-03-22 13:54   ` Ward Hopeman
  2023-03-22 13:55     ` Sean Allred
  0 siblings, 1 reply; 5+ messages in thread
From: Ward Hopeman @ 2023-03-22 13:54 UTC (permalink / raw)
  To: Sean Allred; +Cc: git

Hi Sean,
   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.
   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.

Thanks,
Ward
>

> On Mar 22, 2023, at 5:10 AM, Sean Allred <allred.sean@gmail•com> wrote:
> 
> 
> Ward Hopeman <ward.hopeman@nearearth•aero> writes:
>>    Request: Create an Ignore section that allows for minimal IDE
>>    inclusion without impacting IDE settings for local users.
>> 
>>    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.
> 
> It sounds like you are rather after 'public' vs 'private' IDE settings,
> which would be a feature of the IDE -- not of Git -- and it seems a far
> simpler model. Public settings are checked-in, private settings are not,
> and private settings override public settings.
> 
> This is used by Visual Studio (IIRC) and possible in other tools (Emacs
> I know for sure, though I can't imagine VS Code doesn't have this
> concept by now). It's even the model used by Git itself for some things
> (.gitignore vs. .git/info/exclude vs. core.excludesfile).
> 
> Are these alternative approaches not an option?
> 
> --
> Sean Allred


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature Request: Ignore Tracked IDE files
  2023-03-22 13:54   ` Ward Hopeman
@ 2023-03-22 13:55     ` Sean Allred
  2023-03-22 14:21       ` Ward Hopeman
  0 siblings, 1 reply; 5+ messages in thread
From: Sean Allred @ 2023-03-22 13:55 UTC (permalink / raw)
  To: Ward Hopeman; +Cc: Sean Allred, git


Ward Hopeman <ward.hopeman@nearearth•aero> writes:
> [...] but I agree there appears to be an alternative available. I will
> pursue those configurations with the team.

Best of luck! Managing settings across a team is always an 'interesting'
experience :-)

> 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.

It comes up every now and again, but in lieu of specific examples, it
always 'seems' to be the wrong approach. The Notes section of
git-update-index(1) talks about this a bit:

> Users often try to use the assume-unchanged and skip-worktree bits to
> tell Git to ignore changes to files that are tracked. This does not
> work as expected, since Git may still check working tree files against
> the index when performing certain operations. In general, Git does not
> provide a way to ignore changes to tracked files, so alternate
> solutions are recommended.
>
> For example, if the file you want to change is some sort of config
> file, the repository can include a sample config file that can then be
> copied into the ignored name and modified. The repository can even
> include a script to treat the sample file as a template, modifying and
> copying it automatically.

--
Sean Allred

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Feature Request: Ignore Tracked IDE files
  2023-03-22 13:55     ` Sean Allred
@ 2023-03-22 14:21       ` Ward Hopeman
  0 siblings, 0 replies; 5+ messages in thread
From: Ward Hopeman @ 2023-03-22 14:21 UTC (permalink / raw)
  To: Sean Allred; +Cc: git

Thanks for the info Sean. 
Best regards,
Ward
>

> On Mar 22, 2023, at 9:55 AM, Sean Allred <allred.sean@gmail•com> wrote:
> 
> 
> Ward Hopeman <ward.hopeman@nearearth•aero> writes:
>> [...] but I agree there appears to be an alternative available. I will
>> pursue those configurations with the team.
> 
> Best of luck! Managing settings across a team is always an 'interesting'
> experience :-)
> 
>> 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.
> 
> It comes up every now and again, but in lieu of specific examples, it
> always 'seems' to be the wrong approach. The Notes section of
> git-update-index(1) talks about this a bit:
> 
>> Users often try to use the assume-unchanged and skip-worktree bits to
>> tell Git to ignore changes to files that are tracked. This does not
>> work as expected, since Git may still check working tree files against
>> the index when performing certain operations. In general, Git does not
>> provide a way to ignore changes to tracked files, so alternate
>> solutions are recommended.
>> 
>> For example, if the file you want to change is some sort of config
>> file, the repository can include a sample config file that can then be
>> copied into the ignored name and modified. The repository can even
>> include a script to treat the sample file as a template, modifying and
>> copying it automatically.
> 
> --
> Sean Allred


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-22 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-21 19:49 Feature Request: Ignore Tracked IDE files Ward Hopeman
2023-03-22  9:10 ` Sean Allred
2023-03-22 13:54   ` Ward Hopeman
2023-03-22 13:55     ` Sean Allred
2023-03-22 14:21       ` Ward Hopeman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox