0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Gitでcommit-mをした後に、コミットメッセージを変更する

Posted at

Gitでコミットメッセージを変更したい

GitでCommit -mをした後で、プッシュする前にコメントをやっぱり変更したいと考えた時の対処法を書き残しておく

もう一回commit-mしたら「すでにコミットしたよ」って言われてダメだったので、念のため書いておく

以下のコマンドを書くと変更できる

変更方法
git commit --amend -m "メッセージを書く"
メッセージ変更
//最初にメッセージを書く
git add -A
git commit -m "初期メッセージ"

そのあと、メッセージを変更したくなったときは↓
git commit --amend -m "変更後メッセージ"
0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?