1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

GitHubにプッシュした後にコミットメッセージを修正する方法

Posted at

GitHubにプッシュした後、メッセージに誤りがあることに気づきました!

正:ver.1.2
誤:ver.1.3

正しいコミットメッセージに修正する場合、
以下のコマンドを実行する!
直前のコミットメッセージを修正できます!

git commit --amend -m "修正後のコミットメッセージ"
git push --force-with-lease

force-with-lease は リモートの変更が他の人によって更新されていないことを確認してから強制プッシュする安全な方法です。

チーム開発中の場合、他の人と作業が競合しないか注意!

1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?