Logo Questions Linux Laravel Mysql Ubuntu Git Menu

Show amendments to a commit

If I've done git commit --amend several times on the same commit, is there a way I can list all of the different amendments to a given commit?

like image 908
ʞɔıu Avatar asked Mar 23 '23 17:03


1 Answers

Actually the way exists. You can use the command git reflog

$ git reflog 
d7f7f15 HEAD@{0}: commit (amend): My second commit
f5d2ed5 HEAD@{1}: commit (amend): My second commit
7333d86 HEAD@{2}: commit: My second commit
addbfef HEAD@{3}: commit: This was my first commit

When I use the pugin EGIT in the IDE Eclipse I can see the full list of commits and amendments, and the differences between them. I don't know how to see the differences by command line, if someone know how to do it, please post it.

like image 119
Ricardo Avatar answered Mar 27 '23 19:03