Reputation: 28810
I am on a branch named new_nlp and when I do a git status, I get the following:
# On branch new_nlp
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# deleted: untitled.
I cannot see this file untitled as it is deleted.
I want to switch to master and perform a rebase from new_nlp but when I checkout master and issue the command:
git rebase new_nlp
I get the following error message:
cannot rebase: you have unstaged changes
D untitled.
I cannot see this file and I have no idea how to delete it. I have no idea how it got added.
Does anyone know how I can get past this road block. I have no idea why the file remains in the index.
Upvotes: 13
Views: 48215
Reputation: 265261
the file is deleted and is already tracked by git. you can:
git rm --cached untitled; git commit
) orgit checkout -- untitled
to get back the fileUpvotes: 16