* [Feature Proposal] Add a built-in 'git whoami' command
@ 2026-03-31 14:57 Giorgos Gasparis
2026-03-31 16:26 ` Junio C Hamano
2026-03-31 16:43 ` Kristoffer Haugsbakk
0 siblings, 2 replies; 3+ messages in thread
From: Giorgos Gasparis @ 2026-03-31 14:57 UTC (permalink / raw)
To: git
Hello Git team,
I would like to propose adding a native git whoami command to Git to
easily check the currently active identity.
Currently, users have to run two separate commands (git config
user.name and git config user.email) to check this. This is a frequent
friction point for developers balancing work and personal repositories
who want to double-check their active profile before committing.
To solve this locally, I currently use the following alias in my .gitconfig:
[alias] whoami = !echo "👤 $(git config user.name) | 📧 $(git config
user.email)"
Having a built-in command that provides this kind of unified,
single-line output natively (even as standard plain text without
emojis) would be a great quality-of-life improvement for the wider
community so they don't have to build custom aliases.
Thank you for your time and for maintaining Git, Georgios Gasparis
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Feature Proposal] Add a built-in 'git whoami' command
2026-03-31 14:57 [Feature Proposal] Add a built-in 'git whoami' command Giorgos Gasparis
@ 2026-03-31 16:26 ` Junio C Hamano
2026-03-31 16:43 ` Kristoffer Haugsbakk
1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2026-03-31 16:26 UTC (permalink / raw)
To: Giorgos Gasparis; +Cc: git
Giorgos Gasparis <gasp.giorgos@gmail.com> writes:
> Hello Git team,
>
> I would like to propose adding a native git whoami command to Git to
> easily check the currently active identity.
>
> Currently, users have to run two separate commands (git config
> user.name and git config user.email) to check this.
"git var GIT_AUTHOR_IDENT"?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Feature Proposal] Add a built-in 'git whoami' command
2026-03-31 14:57 [Feature Proposal] Add a built-in 'git whoami' command Giorgos Gasparis
2026-03-31 16:26 ` Junio C Hamano
@ 2026-03-31 16:43 ` Kristoffer Haugsbakk
1 sibling, 0 replies; 3+ messages in thread
From: Kristoffer Haugsbakk @ 2026-03-31 16:43 UTC (permalink / raw)
To: Giorgos Gasparis, git
On Tue, Mar 31, 2026, at 16:57, Giorgos Gasparis wrote:
> I would like to propose adding a native git whoami command to Git to
> easily check the currently active identity.
>
> Currently, users have to run two separate commands (git config
> user.name and git config user.email) to check this. This is a frequent
> friction point for developers balancing work and personal repositories
> who want to double-check their active profile before committing.
>
> To solve this locally, I currently use the following alias in my .gitconfig:
>
> [alias] whoami = !echo "👤 $(git config user.name) | 📧 $(git config
> user.email)"
Strange. I was looking at an example from git-interpret-trailers(1) today.
$ git config trailer.sign.cmd 'echo "$(git config user.name) <$(git config user.email)>"'
And “git-whoami(1)?” jumped in to my mind.
You can kind of get that with [which Junio mentioned after I wrote this draft]
git var GIT_AUTHOR_IDENT | sed -e 's/> .*/>/'
Too bad with the postprocessing needed for the timestamp.
> Having a built-in command that provides this kind of unified,
> single-line output natively (even as standard plain text without
> emojis) would be a great quality-of-life improvement for the wider
> community so they don't have to build custom aliases.
A problem (subjectively) is that there are already 147 git(1) commands.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-31 16:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-31 14:57 [Feature Proposal] Add a built-in 'git whoami' command Giorgos Gasparis
2026-03-31 16:26 ` Junio C Hamano
2026-03-31 16:43 ` Kristoffer Haugsbakk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox