19

A picture where these buttons are

enter image description here

Hi I started to use VS Code version control.

I know difference between 'Commit All' and 'Commit Staged'

but can't figure out commit (Amend) and commit (Signed Off)

I checked VS Code version control Doc and it is not explained ...

I want to know what are they and when to use it.

Suraj Kumar
  • 5,547
  • 8
  • 20
  • 42
Cosmopolitan
  • 193
  • 1
  • 6

1 Answers1

9

Those are not VS Code features but just Git commit options.

Signed Off: adding a Signed-off-by line at the end of the commit log message.

Ref: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff

Amend: really amend that already committed on current branch.

Ref: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---amend

zmag
  • 7,825
  • 12
  • 32
  • 42
  • I get merge conflicts whenever I use the amend option from VSCode? – mspoulsen Mar 10 '21 at 09:52
  • @mspoulsen You have to force push whenever you git amend (or rewrite git history in general); settings to enable in VSCode: https://stackoverflow.com/a/56485045/8214747 – Saeed Baig Feb 24 '22 at 07:22
  • @SaeedBaig I amended my most recent commit just a moment ago and did not have to force push, maybe because it's at the HEAD of a branch and not pushed? What conditions require force push for amending commits? – Walter Monroe Jan 27 '23 at 08:55