Open5
Gitメモ
![はる](https://res.cloudinary.com/zenn/image/fetch/s--X-4PoGcC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/577429ad3f.jpeg)
リリースタグ名を指定してクローン
git clone -b リリースタグ名 [https://リポジトリのアドレス]
追記:ブランチ名を指定するときも、同様で、リリースタグ名の部分をブランチ名にすれば良いだけ。
![はる](https://res.cloudinary.com/zenn/image/fetch/s--X-4PoGcC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/577429ad3f.jpeg)
特定のコミットまで戻して動作確認
コミットを確認
git log --oneline -n 20
特定のコミットに戻る
git reset --hard <commit_hash>
最新の状態に戻す
git reset --hard HEAD@{2}
![はる](https://res.cloudinary.com/zenn/image/fetch/s--X-4PoGcC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/577429ad3f.jpeg)
直前のコミットメッセージを変える
git commit --amend -m "<ここにメッセージ>"
![はる](https://res.cloudinary.com/zenn/image/fetch/s--X-4PoGcC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/577429ad3f.jpeg)
stashで戻す(applyする)
git stash apply 数字
数字は、git stash listで、どの番号がその該当stashかで確認する。
![はる](https://res.cloudinary.com/zenn/image/fetch/s--X-4PoGcC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_70/https://storage.googleapis.com/zenn-user-upload/avatar/577429ad3f.jpeg)
stashにメッセージをつける(message)
git stash --message "<ここにメッセージ>"