Conversation

dmlemos

When you leave for the day and come back next day without much clue in what you did the day before. Or when you finish something and don't come back to it for a few weeks.

This command lists your last commit, which should help knowing what you did 😄

@hemanth

Is it a little too much 🤔?

@Thanood

I love it. 😂

@dmlemos

Discovered this repo recently so I am just giving my contributions. Mostly going through my aliases. Hope it helps other people as well.

@hemanth

Let us wait for some more upvotes?

aliases at times can get too messy.

@goldie-lin

I thought the option--global in git config --global user.email was a typo, should it be --get?

@dmlemos

--global is a parameter referencing the location of the config file in the disk.

The default action for the command is to do a get, hence why it is omitted. However, the default config file location is global. Hence git config --get user.email also works.

from git config help

Config file location
    --global              use global config file
    --system              use system config file
    --local               use repository config file

@goldie-lin

In my opinion, --get is more generic than --global, --system, and --local options; since I had few git repositories which setup user.name and user.email locally. Just my two cents.

Could I know why you prefer --global rather than others?

By the way, I set my global user.name and user.email in ~/.config/git/config ~/.config/git/config.local instead of ~/.gitconfig, and I'm just aware of that --global didn't work for me. It seems that --global option only works for ~/.gitconfig and ~/.config/git/config, not ~/.config/git/config ~/.config/git/config.local, maybe it's a bug of git.

Updated:

I found why my setup not work with --global. I did not save user.name and user.email in ~/.config/git/config, actually I saved it in ~/.config/git/config.local which it will be included from ~/.config/git/config by adding a git config --global include.path '~/.config/git/config.local' in ~/.config/git/config.

@goldie-lin

Updated: I found why my setup not work with --global, hope you won't mind.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.