Atom’s file reloading doesn’t work quite right with untracked files and git branch switching. To reproduce:
Atom v 1.0.19
Ubuntu 14.04.2 LTS
Leave all file tabs open throughout these steps
- Have an
<original_branch>
with files that don’t exist in<other_branch>
with changes in them -
git stash
(buffers update appropriately) git checkout <other_branch>
git checkout <original_branch>
-
git stash pop
(file buffers that exist in<other_branch>
update, but buffers that only exist in<original_branch>
do not)
Your files that didn’t exist in the <other_branch>
will not have had the git stash pop
changes applied to their buffer, they will be left in the same state as right after the git stash
. When closing the files you get an unsaved changes prompt but the tab doesn’t have the unsaved changes mark (has the close tab x instead of blue unsaved circle).
I’m running into this a lot because I make core changes in my branch that need to be cherry-picked upstream. Every time I switch to cherry-pick I run the risk of accidentally saving over my branch files accidentally and without warning.