When I want to stage one file I use the command magit-stage. It works.

But now I want to stage many files at once, using the command magit-stage-modified.

Here's a sceenshot:


But after I press y nothing happens. All files stay in the Untracked files section.

1 Answer 1


magit-stage-modified only stages modified files. Files that are not being tracked by git are not modified. Here "modified" means "there are changes compared to the changes in the index". Files that are not even being tracked are not in the index.

You can stage all untracked files by moving the cursor to Untracked files (5) and pressing s. Or you could invoke magit-stage-modified with a prefix argument - in that case it also stages untracked files.

You should also read Getting Started in the manual, which among other things, describes various ways to stage changes.

  • For those wondering: you can issue the prefix argument from magit status as per, using C-u. So the full sequence would be C-x g C-u S.
    – hraban
    Commented Apr 28, 2021 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.