一旦コミットしてからちょっとした修正を入れた場合に、この修正も元のコミットに含めてしまいたいことがある。 そんな時には、git commit --amendすれば一つ目のコミットに後からの修正もまとめることができる。 # aというファイルを追加し、一旦コミットする $ git commit -m "add a file" # その後、aに修正を入れる $ git status Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: a # <- aが修正されている $ git add . # 変更をイン