0

I'm a very limited git user and most of the time, I just want to stage commit and push my code without too much ceremony.

What's the git add -A equivalent for magit? (I want to do it programmatically)

1
  • You might also consider git commit --all, you can add "--all" to magit-commit-arguments so that it's enabled by default.
    – npostavs
    Sep 25, 2018 at 12:12

1 Answer 1

2

Just press S to stage all unstaged changes.

To also include all untracked files (other than .gitignored files), use a prefix argument: C-uS

You can alternatively type s on the relevant section headings: "Unstaged changes" and "Untracked files", which you can jump to with ju and jn respectively.

2
  • is there a way to programmatically do it?
    – zcaudate
    Sep 25, 2018 at 10:23
  • You can check what elisp functions the respective keyboard shortcuts call and call them directly from a new function.
    – choroba
    Sep 25, 2018 at 11:04

Your Answer

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

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