1

I have a project that someone else has done work on and I would like to be able to create a patch file and then import the patch but have the commit tag with their username/email.

I have no problem creating a patch file from their source, and using git apply /path/to/patch to apply the changes, yet if I git commit it will be tagged with my name.

How do I commit with an email/username manually?

1 Answer 1

4

Use git commit --author="John Doe <[email protected]>". This will set the authorship fields to the specified identity, but the committer fields will retain your identity. This is probably what you want (the semantic meaning is "written by this other guy, but committed to the repository by me").

Sign up to request clarification or add additional context in comments.

1 Comment

If only I tried reading for git-commit, I was trying to find the answer in git-format-patch, git-am and git-apply. Thanks for your help cdhowie :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.