<手順>
1, まずは修正内容を確認する。
$ git status #ターミナルに作業した内容、変更した内容が出てくる
2, 修正内容を別の場所に一時保管する。
$ git stash
その後もう一度git status
をすると先ほどの修正内容はなくなり、ターミナルに下記のような文章が出るはず。
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
3, 本来作業をしたかったブランチに切り替えorブランチ作り切り替える。
git checkout -b ○○○
4, 一時保管していた内容を切り替えたブランチに適用する。
git stash apply