ワンクリックで
git-commit-author-identity
Commit with the right name/email per repo, and survive spaces in `git -c user.name=...`.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Commit with the right name/email per repo, and survive spaces in `git -c user.name=...`.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
A TRefCountPtr/TSharedPtr member in a UE class needs the pointee's full definition, not a forward decl.
When WSL's mirrored networking fails and falls back to "None", plus /etc/wsl.conf has generateResolvConf=false, the distro has no DNS; fix both layers.
When a Windows shell (PowerShell/cmd) feeds a bash script into WSL, CRLF line endings can corrupt the first shell builtin; force LF or pipe via a temp file.
Before "fixing" a recurring error, check git log to see if it was already fixed upstream — the working tree may just be stale.
Always add a space after URL brackets in Markdown to prevent 404 errors with special characters.
Plan a Python 3 modernization sweep (f-strings, super(), type hints) as a series of mechanical PRs, not one mega-PR.
| name | git-commit-author-identity |
| description | Commit with the right name/email per repo, and survive spaces in `git -c user.name=...`. |
| tags | ["git","shell","identity"] |
You're about to create a commit in a repo whose default identity may
not match the user's intent — a freshly cloned sibling repo, a
throwaway scratch clone, or a CI-like environment where user.name /
user.email are unset. Common trigger: the user says "use the same
identity as ".
Two recurring failures:
Committing with the wrong identity (e.g. a work email into a
personal OSS repo, or root@hostname from an unconfigured clone).
Trying to override per-command with git -c user.name='First Last'
and having the shell split the quoted value, so git sees
user.name=First and treats Last as the next config key:
error: key does not contain a section: useAdd
fatal: unable to parse command-line config
Or, if it parses, the committed author ends up as First_Last /
First because quoting was stripped somewhere along the pipeline.
Read the target identity from an existing repo the user trusts:
git -C /path/to/reference-repo config user.name
git -C /path/to/reference-repo config user.email
Commit using environment variables, which survive any shell quoting shenanigans:
GIT_AUTHOR_NAME="First Last" \
GIT_AUTHOR_EMAIL="me@example.com" \
GIT_COMMITTER_NAME="First Last" \
GIT_COMMITTER_EMAIL="me@example.com" \
git -C /path/to/repo commit -F .commit_msg.tmp
Verify immediately before pushing:
git -C /path/to/repo log -n1 --format='author=%an <%ae>%n committer=%cn <%ce>'
If you got it wrong, fix in place with --amend --reset-author
(only safe if you haven't pushed yet):
GIT_AUTHOR_NAME="First Last" GIT_AUTHOR_EMAIL="me@example.com" \
GIT_COMMITTER_NAME="First Last" GIT_COMMITTER_EMAIL="me@example.com" \
git -C /path/to/repo commit --amend --no-edit --reset-author
Wrong (will sometimes give First_Last as the author, sometimes
error out with key does not contain a section):
git -c user.name='First Last' -c user.email=me@example.com commit -m "msg"
Right:
GIT_AUTHOR_NAME="First Last" GIT_AUTHOR_EMAIL="me@example.com" \
GIT_COMMITTER_NAME="First Last" GIT_COMMITTER_EMAIL="me@example.com" \
git commit -F .commit_msg.tmp
git -c does work on the shell in a normal terminal, but through
agent tools the quoting is lossy. Env vars are the safe default.--reset-author only rewrites the author by default; set both
GIT_AUTHOR_* and GIT_COMMITTER_* or the committer will keep the
old identity.