# Adding 'Signed-off-by' to 'subtree add --squash' commits

3 messages from 2014-07-07 to 2014-07-07. Participants: Finucane, Stephen, Andreas Schwab, Jeff King.
Thread: https://gitlist.dev/t/37070

## Finucane, Stephen, 2014-07-07 09:32

Subject: Adding 'Signed-off-by' to 'subtree add --squash' commits
Message-ID: <6A74A01C3512C646A9ED99AFA28AEB981358A7E8@IRSMSX102.ger.corp.intel.com>
URL: https://gitlist.dev/e/6A74A01C3512C646A9ED99AFA28AEB981358A7E8%40IRSMSX102.ger.corp.intel.com

```
Is it possible to "sign off" squashed commits created by the 'git subtree add ... --squash' command?

I ask, because the Signed-off-by tag is a requirement for a project I work on, but I've been unable to achieve this. A thorough search of Google/StackOverflow reveals nothing.

Regards,

Stephen Finucane

PS: A visualisation. The issue is the second "squash" commit

  |\  Merge: 0000000 0000000
  | | Author: Stephen Finucane <stephen.finucane@intel.com>
  | | Date:   Mon Jul 7 10:21:51 2014 +0100
  | |
  | |     Add xxx as a git subtree
  | |
  | |     - There is no problem with this commit.
  | |
  | |     Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
  | |
  | * commit 0000000000000000000000000000000000000000
  |   Author: Stephen Finucane <stephen.finucane@intel.com>
  |   Date:   Mon Jul 7 10:21:51 2014 +0100
  |
  |       Squashed 'path/' content from commit 0000000
  |
  |       git-subtree-dir: path
  |       git-subtree-split: 0000000000000000000000000000000000000000
  |
  * commit 0000000000000000000000000000000000000000
  | Author: Stephen Finucane <stephen.finucane@intel.com>
  | Date:   Mon Jul 7 10:04:38 2014 +0100
  ...
--------------------------------------------------------------
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

```

## Andreas Schwab, 2014-07-07 16:55

Subject: Re: Adding 'Signed-off-by' to 'subtree add --squash' commits
Message-ID: <87vbr93y8k.fsf@igel.home>
URL: https://gitlist.dev/e/87vbr93y8k.fsf%40igel.home
In-Reply-To: <6A74A01C3512C646A9ED99AFA28AEB981358A7E8@IRSMSX102.ger.corp.intel.com>

```
"Finucane, Stephen" <stephen.finucane@intel.com> writes:

> Is it possible to "sign off" squashed commits created by the 'git subtree add ... --squash' command?

If it isn't directly possible, you can always use "git commit --amend -C
HEAD -s" to modify the commit afterwards.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

```

## Jeff King, 2014-07-07 17:20

Subject: Re: Adding 'Signed-off-by' to 'subtree add --squash' commits
Message-ID: <20140707172017.GA28405@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20140707172017.GA28405%40sigill.intra.peff.net
In-Reply-To: <87vbr93y8k.fsf@igel.home>

```
On Mon, Jul 07, 2014 at 06:55:07PM +0200, Andreas Schwab wrote:

> "Finucane, Stephen" <stephen.finucane@intel.com> writes:
> 
> > Is it possible to "sign off" squashed commits created by the 'git subtree add ... --squash' command?
> 
> If it isn't directly possible, you can always use "git commit --amend -C
> HEAD -s" to modify the commit afterwards.

I think that is sensible, though these days you can spell "-C HEAD" as
"--no-edit", which I think is a bit more obvious.

-Peff

```
