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)

  • 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 '18 at 12:12
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.

  • is there a way to programmatically do it? – zcaudate Sep 25 '18 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 '18 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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