git-katas icon indicating copy to clipboard operation
git-katas copied to clipboard

Make a kata about global git configuration

Open RandomSort opened this issue 7 years ago • 3 comments

Might not make sense as it is global ( and thus broken ) but could be a good idea to elaborate on the differences between user, repo and global configurations.

RandomSort avatar Oct 10 '17 06:10 RandomSort

As per git's documentation, there are different levels config could be set up, i.e. --system, --global, --local, --worktree and --file .

Aren't first 3 sufficient for this story which are more or less usual scenarios? @RandomSort @sofusalbertsen @JKrag ?

schiluveri avatar Apr 02 '20 12:04 schiluveri

I totally agree that we can leave out --worktree and --file. I would even argue that for a basic Kata, --system is not even needed. The important thing for normal users is to really understand the difference between global and local configs.

On the other hand it might be relevant to address that some configuration options can be overruled by environment variables and especially command line switches? By I am not sure about this. Maybe we can leave it for an advanced kata later?

I would probably be useful to included the use of git config -l --show-origin, partly because it is in general a useful command to know, and partly because it is a great teaching tool :-)

JKrag avatar Apr 02 '20 22:04 JKrag

I totally agree that we can leave out --worktree and --file. I would even argue that for a basic Kata, --system is not even needed. The important thing for normal users is to really understand the difference between global and local configs.

On the other hand it might be relevant to address that some configuration options can be overruled by environment variables and especially command line switches? By I am not sure about this. Maybe we can leave it for an advanced kata later?

I would probably be useful to included the use of git config -l --show-origin, partly because it is in general a useful command to know, and partly because it is a great teaching tool :-)

Agree. --system option is rarely touched per my experience.

--global and --local options with some listing commands would it be.

schiluveri avatar Apr 06 '20 07:04 schiluveri