In the open source world, as well as in companies, you may be asked to sign your commits.
Sometimes, you know that after pushing a commit.
Don't worry, it's not too late!
The story:
- I push a commit in an (open source) repository
- I open a Pull Request (PR)
- I receive an automatic message:
"missing DCO signoff"
Oh damn!! 😅
I have already commited and pushed, but the DCO is missing, what to do??
Don’t panic, there are two magical commands for this case:
$ git commit --amend --no-edit --signoff
[patch-1 174b5fb] feat: add k8saudit-ovh in registry.yaml file
Author: Aurelie Vache <xxx@xxx.xxx>
Date: Mon Jan 26 19:01:46 2026 +0000
1 file changed, 27 insertions(+)
$ git push -f origin patch-1
Let's explain the commands:
The --no-edit parameter, in the git commit command, allows to not open automatically the editor (vi on my side) with the commit and the signature. You need to close the file for the commit to occur.
And the -f parameter, in the git push command, allows you to force the push. You want to add your signature and you really want it ^^.
Tips:
You can create an alias:
alias git-oops=git commit --amend --no-edit --signoff
You can also signoff the last two commits:
git rebase --signoff HEAD~2
Conclusion
Git is a version manager (SCM) used in mass, but like many tools we use every day, it is full of great practical features but not very easy to understand.
I hope this example will be useful to you.



Top comments (0)