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で一時的に特定のリビジョンに戻す方法

Last updated at Posted at 2023-09-27
git checkout リビジョンID

上記で特定のリビジョンの状態に戻すことができます。

git checkout リビジョンID ファイルパス

上記で特定のファイルを特定のリビジョンの状態に戻すことができます。

git checkout [branch_name]

元に戻す場合は上記の通りブランチ名でチェックアウトする

appendix

git log --grep="your_search_term"
git log --since="YYYY-MM-DD" --until="YYYY-MM-DD"
git log | grep "2023-10-09"
git log -p ファイルパス
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?