Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7.6 Git のさまざまなツール - 歴史の書き換えでの間違い #108

Open
ghost opened this issue Sep 1, 2018 · 0 comments
Open

Comments

@ghost
Copy link

ghost commented Sep 1, 2018

ファイルを編集して git add したり追跡中のファイルを git rm したりしてステージングエリアをお好みの状態にしたら、続いて git commit --amend を実行します。すると、現在のステージングエリアの状態を次回のコミット用のスナップショットにします。

というところ

英語版では

If, on the other hand, you want to change the actual content of your last commit, the process works basically the same way — first make the changes you think you forgot, stage those changes, and the subsequent git commit --amend replaces that last commit with your new, improved commit.

なので

すると、現在のステージングエリアの状態を次回のコミット用のスナップショットにします。

ではなく
すると、新しい改善されたコミットで最後のコミットを置き換えます。

の意味ですよね。
正:現在のステージングエリアの状態を使ったコミットで最後のコミットが置き換わる
誤:現在のステージングエリアの状態を次回のコミット用のスナップショットにする

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants