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

gitで間違えてコミットしてしまったときに試したいこと

Posted at

(プログラム修正)
カタカタバチーんEnterキーで決めたった

git commit -m "これで仕事終わり"

やったと思ったが束の間、よく見ると変更が間違っている…

ここで思いつくこと
1。もう一度ファイル修正するか
2。コミットを打ち消すか (git revert 間違ってコミットしたときのコミットID)

2の方法を使うとコミットを打ち消すコミットを作ってくれている。
ファイルはこのコミットで行った変更前の状態に戻ります。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?