git - How to stage deleted files inside a deleted folder -
i'm trying stage individual files delete, git (v1.9.1) refuses stage them because folder used reside has been deleted.
i cannot use git add -u
because stage all modified , deleted files. if
git add -u /path/to/deleted/folder/afile
or
git rm /path/to/deleted/folder/afile
i get:
fatal: not switch '/path/to/deleted/folder/': no such file or directory
which because /path/to/deleted/folder/
no longer exists.
i cannot understand why git needs switch directory when being told stage deleted files , having manually recreate each deleted folder let git know, yes, file gone seems insane.
is there way of forcing git stage deleted file without requiring path exist?
with credit wolf , romanarmy, upgrading 2.5 allows git rm
succeed.
just in case else cares, here's how upgraded ubuntu 14.04 default git 2.5:
$ sudo add-apt-repository ppa:git-core/ppa $ sudo apt-get update $ sudo apt-get install git $ git --version git version 2.5.0
Comments
Post a Comment