Git

$ git commit-What is the "last commit" of amend?

$ git commit --amend can change "last commit". But what is "immediately before" here?

It is "immediately before" for "the state of the current update work". (Ie the current HEAD)

So the subject of --amend changes with the situation. For example, if you are editing a past commit in $ git rebase -i (interactive mode), the amend target will change.

If you are not sure, try running $ git log . Specifically, the commit displayed here at the top of the list is subject to $ commit --amend .

If you feel anxious, it's a good $ git log to make sure to make a $ git log advance.


Original by

$ git commit --amend の「直前のコミット」って何?


About

About this translattion