🖥

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

2019/04/16に公開

$ 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

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

Twitter

https://twitter.com/YumaInaura

公開日時

2019-04-16

Discussion