Skip to main content

commit ↔ to create new Commit with Diff added in Staging

git commit -m "init"

to Commit with msg of init

git commit -am "_change"

to add Working Dir & Commit with msg of _change

-m

flag to add msg

--amend

flag to change msg on last Commit

git commit --amend _new

to fix previous Commit with _new name

git commit --amend --no-edit

to fix & update previous Commit with extra Staging file (after git add .)

--fixup

flag to combine squash within commit cmd

--squash

flag to combine squash within commit cmd

References

  1. --fixup ↔ flag to combine squash within commit cmd

  2. --squash ↔ flag to combine squash within commit cmd