I work with different git identities, and since I sometimes manage to mix them up, is there a way to display this information when commiting?
Along the list of modified files.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As mentioned before, you can use the
.git/hooks/prepare-commit-messagegit hook with such content:This adds, at the end of the pre-formatted commit message, the line
See
man githooksand.git/hooks/prepare-commit-msg.samplefor further information and examples.