I'm generating a git patch. And then I want to send it to the project maintainer.
I want to mark my Name and my email address as signed-off-by
in the git patch
How to do it ? in order that the project maintainer get the signed-off-by
field with my name and email address.
In order to create Git patch file for a specific commit, use the “git format-patch” command with the “-1” option and the commit SHA. In order to get the commit SHA, you have to use the “git log” command and look for the corresponding commit SHA.
Sign-off is a line at the end of the commit message which certifies who is the author of the commit. Its main purpose is to improve tracking of who did what, especially with patches. It should contain the user real name if used for an open-source project.
GIT patch or GIT diff is used to share the changes made by you to others without pushing it to main branch of the repository. This way other people can check your changes from the GIT patch file you made and suggest the necessary corrections.
Git Cola includes an "Apply Patches" dialog that can be launched from the Actions menu, or via the git cola am sub-command. You can open patches in this dialog and display the contents with diff syntax highlighting. This feature is available in master by cloning the repo and will be in the upcoming v3.
When you commit, just use:
git commit -s
or
git commit --signoff
Or you can just write at the end of the commit message, on a line by itself separated by a blank line from the body of the commit:
Signed-off-by: Your Name <[email protected]>
If you already have the commit, use git commit -s --amend
to add the above signoff line.
Or, if you are going to be sending this as a patch or patch series, you can use git format-patch -s
or --signoff
to add the signoff to the patch itself, without modifying the commit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With