0
0

git stash applyした後の諸々変更した後に,もう一度stashの時点から戻りたいとき

Posted at

git stash apply stash@{0}を実行した後に諸々変更を加えていたが,もう一度stashの時点からやり直したい時があったのでその時の作業コマンドをメモする.

適当なブランチを切る

git stash applyした後の作業内容を一旦temp_branchに退避させる.

git checkout -b temp_branch

その後にコミットする

git add .
git commit -m "temp commit"

戻る

git checkout develop

新しい作業ブランチでstashを適用

git stash branch temp_stash_branch

退避させたブランチを削除

git branch -D temp_branch
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