With git 1.7.9, it's possible to sign a commit with the
-S option. Is it possible to set it default through
git config --global?
So instead of
git commit -S -m 'Commit message', it would be just
git commit -m 'Commit message'.
closed as off topic by EEAA, Ward, Michael Hampton♦, Scott Pack, pauska Oct 5 '12 at 10:16
Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.
To sign automatically all future git commits, you can define a global alias. For example, to create a global alias called "c", you would do this:
(note that the commit switch to sign off is lowercase "-s" and NOT uppercase "-S", as you typed in your question).
After having done this, you can start doing your commits using your newly created "c" alias. Here's an example of creating and commiting a file called "test.txt" that will be signed off by the committer:
You can see that the commit has the "Signed-off-by:" line if you run the "git log" command with the