LoginSignup
0
0

More than 1 year has passed since last update.

[Git] コミットを修正する

Posted at

直前のコミット

commit --amend

git commit --amend

reset-author

コミットの作者もリセットできる

git commit --amend --reset-author

古いコミット

rebase -i

git rebase -i HEAD~n 

コマンドで、デフォルトのテキストエディタに直近 n コミットの一覧を表示できる
修正したいコミットの前のpickの文字をeditに変更して保存・終了する

内容修正した後

git add .
git commit --amend
git rebase --continue

Reference

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0