{"thread":{"id":"65396","subject":"[Feature Proposal] Add a built-in 'git whoami' command","startedAt":"2026-03-31T14:58:10Z","lastAt":"2026-03-31T16:43:24Z","messageCount":3,"participants":["Giorgos Gasparis","Junio C Hamano","Kristoffer Haugsbakk"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"540522","messageId":"CALCP2CjymE-i9TsKB8TmW_0M=ZDbtLPzZFpx4-ba01164b1MOA@mail.gmail.com","threadId":"65396","inReplyTo":null,"subject":"[Feature Proposal] Add a built-in 'git whoami' command","fromName":"Giorgos Gasparis","fromEmail":"gasp.giorgos@gmail.com","sentAt":"2026-03-31T14:57:55Z","receivedAt":"2026-03-31T14:58:10Z","isPatch":false,"body":"Hello Git team,\n\nI would like to propose adding a native git whoami command to Git to\neasily check the currently active identity.\n\nCurrently, users have to run two separate commands (git config\nuser.name and git config user.email) to check this. This is a frequent\nfriction point for developers balancing work and personal repositories\nwho want to double-check their active profile before committing.\n\nTo solve this locally, I currently use the following alias in my .gitconfig:\n\n[alias] whoami = !echo \"👤 $(git config user.name) | 📧 $(git config\nuser.email)\"\n\nHaving a built-in command that provides this kind of unified,\nsingle-line output natively (even as standard plain text without\nemojis) would be a great quality-of-life improvement for the wider\ncommunity so they don't have to build custom aliases.\n\nThank you for your time and for maintaining Git, Georgios Gasparis\n"},{"id":"540535","messageId":"xmqqzf3o0xuj.fsf@gitster.g","threadId":"65396","inReplyTo":"CALCP2CjymE-i9TsKB8TmW_0M=ZDbtLPzZFpx4-ba01164b1MOA@mail.gmail.com","subject":"Re: [Feature Proposal] Add a built-in 'git whoami' command","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-31T16:26:12Z","receivedAt":"2026-03-31T16:26:14Z","isPatch":false,"body":"Giorgos Gasparis <gasp.giorgos@gmail.com> writes:\n\n> Hello Git team,\n>\n> I would like to propose adding a native git whoami command to Git to\n> easily check the currently active identity.\n>\n> Currently, users have to run two separate commands (git config\n> user.name and git config user.email) to check this.\n\n\"git var GIT_AUTHOR_IDENT\"?\n\n"},{"id":"540537","messageId":"fab20df3-248b-4590-9b3e-e7601404df55@app.fastmail.com","threadId":"65396","inReplyTo":"CALCP2CjymE-i9TsKB8TmW_0M=ZDbtLPzZFpx4-ba01164b1MOA@mail.gmail.com","subject":"Re: [Feature Proposal] Add a built-in 'git whoami' command","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-03-31T16:43:02Z","receivedAt":"2026-03-31T16:43:24Z","isPatch":false,"body":"On Tue, Mar 31, 2026, at 16:57, Giorgos Gasparis wrote:\n> I would like to propose adding a native git whoami command to Git to\n> easily check the currently active identity.\n>\n> Currently, users have to run two separate commands (git config\n> user.name and git config user.email) to check this. This is a frequent\n> friction point for developers balancing work and personal repositories\n> who want to double-check their active profile before committing.\n>\n> To solve this locally, I currently use the following alias in my .gitconfig:\n>\n> [alias] whoami = !echo \"👤 $(git config user.name) | 📧 $(git config\n> user.email)\"\n\nStrange. I was looking at an example from git-interpret-trailers(1) today.\n\n    $ git config trailer.sign.cmd 'echo \"$(git config user.name) <$(git config user.email)>\"'\n\nAnd “git-whoami(1)?” jumped in to my mind.\n\nYou can kind of get that with [which Junio mentioned after I wrote this draft]\n\n    git var GIT_AUTHOR_IDENT | sed -e 's/> .*/>/'\n\nToo bad with the postprocessing needed for the timestamp.\n\n> Having a built-in command that provides this kind of unified,\n> single-line output natively (even as standard plain text without\n> emojis) would be a great quality-of-life improvement for the wider\n> community so they don't have to build custom aliases.\n\nA problem (subjectively) is that there are already 147 git(1) commands.\n"}]}