git commit forget Signed-off-by

If you forget to set “Signed-off-by” in the commit. This is now problem, you can still do it afterwards.

To sign-off the last two commits:

git filter-branch --msg-filter "cat - && echo && echo 'Signed-off-by: Your Name '" HEAD~2..HEAD

Then force to push them to the remote repo with the -f option:

git push -f

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.