diff --git a/magit.el b/magit.el index 1faa4e0f..7e385829 100644 --- a/magit.el +++ b/magit.el @@ -427,6 +427,7 @@ Many Magit faces inherit from this one by default." (define-key map (kbd "s") 'magit-stage-thing-at-point) (define-key map (kbd "S") 'magit-stage-all) (define-key map (kbd "u") 'magit-unstage-thing-at-point) + (define-key map (kbd "U") 'magit-unstage-all) (define-key map (kbd "i") 'magit-ignore-thing-at-point) (define-key map (kbd "?") 'magit-describe-thing-at-point) (define-key map (kbd ".") 'magit-mark-thing-at-point) @@ -728,6 +729,10 @@ Please see the manual for a complete description of Magit. (interactive) (magit-run "git" "add" "-u" ".")) +(defun magit-unstage-all () + (interactive) + (magit-run "git" "reset" "HEAD")) + ;;; Branches (defun magit-checkout (rev) diff --git a/magit.texi b/magit.texi index bc188040..42da7a5d 100644 --- a/magit.texi +++ b/magit.texi @@ -130,7 +130,7 @@ into the hunk and type @kbd{s}. Likewise, to unstage a hunk, move point into it and type @kbd{u}. If point is in a diff header when you type @kbd{s} or @kbd{u}, all hunks belonging to that diff are moved at the same time. To move all hunks of all diffs into the staging area -in one go, type @kbd{S}. +in one go, type @kbd{S}. To unstage everything, type @kbd{U}. Before committing the changes in the staging area, you should write a short description of them.