Git Signoff Shortcut [Snippet]
Working on a project that uses Developers Certificates of Origin? Here's how to create an alias and signoff for git.
Join the DZone community and get the full member experience.
Join For FreeWhen Helm moved from a CLA to a DCO, it meant I needed to start adding a signoff to my commits on that project. While git makes this almost easy, by using the --signoff
flag, it means I need to remember to use the flag when committing.
To make it easier I created an alias so I can use git cs
and it will commit with signoff.
To create the alias I ran the command:
$ git config --global alias.cs 'commit --signoff'
After that, I had an alias I could use when using a signoff.
Published at DZone with permission of Matt Farina, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments