Automatically sign all commits with git [closed]

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:

$ git config --global alias.c 'commit -s'

(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:

$ vim test.txt
[edit file]
$ git add test.txt
$ git c -m 'My commit message'

You can see that the commit has the "Signed-off-by:" line if you run the "git log" command with the --pretty=fuller option:

$ git log --pretty=fuller