Magit Stage All Changes

As I’ve mentioned previously, I keep my blog posts—all my work, really—in a git repository. I manage the repositories with magit. If you aren’t a magit user, you’re really missing out and should take a look.

When I publish a post there are usually 3 files affected that need to be committed. In magit-status, I just type 【S】 to stage them all and can then commit. Recently, magit was changed to ask for confirmation before staging all the changed files. While I appreciate the offer, I find it annoying. If I change my mind I can just unstage everything with 【U】 and start over. Others, I’m sure, have different needs but I really don’t want to be asked every time I commit.

Happily, there’s an easy solution. After a little grubbing around in the code, I discovered that there’s a configuration variable to inhibit the confirmation. Just set

(setq magit-stage-all-confirm nil)

and you’re back to the old way. As usual, Emacs makes it easy to have things your way.

The unstage-all command also has a new confirmation. You can get rid of it, if you like, with

(setq magit-unstage-all-confirm nil)

but I didn’t bother with it because I rarely use that command.

This entry was posted in General and tagged . Bookmark the permalink.