is there any way to fetch uncommited changes I left when I checkout out a new branch (dumb, I know!!)
I switched back the branch I was on, and I still have the following message, leading me to believe they might be somewhere I can get to!
M app-switcher.tmproj
M as_user_check.php
If you switch from one branch to another, and the change of branches wouldn’t affect files that you’ve modified in your working tree, your working copy of those files won’t be affected. The output that you see from
git checkoutis reminding you of that.To see the unstaged changes in those files, you can just do:
… and you can just checkout the branch you want to commit those changes to and
git addandgit commitas usual.One possible source of confusion is that you’ll see the same output (with an
Mprefix) if the changes have been staged. In that case, to see the changes, you’ll have to do:In that case, you can just switch to the right branch with
git checkoutand commit those changes withgit commit. If you want to unstage the changes, you can do:… as the output of
git statusshould prompt you.