This is a very basic but I have been unable to find the answer on the web.
Is it possible to git rm
, i.e. to remove a tracked file, from magit?
Thanks
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityThis is a very basic but I have been unable to find the answer on the web.
Is it possible to git rm
, i.e. to remove a tracked file, from magit?
Thanks
Magit does not provide a command that does git rm
(but if you opened a feature request, then I would probably add it eventually).
Meanwhile you can delete the file using some other method, e.g. using M-x delete-file RET <file> RET. Once you have done that refresh the Magit buffer using g and then stage the "deletion" of the file by moving to it in the list of unstaged changes and then pressing s.
Magit doesn't support git rm
. Instead, delete the folder in dired, and then stage the change.
You can also use ! to launch any git command.
git rm --cached
does not remove the file from disk, whereas git rm
does. Thanks!
– Daniel
Jan 11 '19 at 15:45