Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between VS Code's 'Commit (Amend)' and 'Commit (Signed Off)'?

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.

like image 240
Cosmopolitan Avatar asked Mar 12 '19 05:03

Cosmopolitan


People also ask

What does it mean to amend a commit?

The git commit --amend command is a convenient way to modify the most recent commit. It lets you combine staged changes with the previous commit instead of creating an entirely new commit. It can also be used to simply edit the previous commit message without changing its snapshot.

What is amend commit and push?

Amending a commit is a way to modify the most recent commit you have made in your current branch. This can be helpful if you need to edit the commit message or if you forgot to include changes in the commit. You can continue to amend a commit until you push it to the remote repository.

How do I rename a commit before a push?

On the command line, navigate to the repository that contains the commit you want to amend. Type git commit --amend and press Enter. In your text editor, edit the commit message, and save the commit.


1 Answers

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

like image 128
zmag Avatar answered Sep 27 '22 16:09

zmag