Bind magit-unstage-all to 'U'.

* magit.el (magit-unstage-all): New.
This commit is contained in:
Marius Vollmer 2008-08-21 00:19:15 +03:00
parent 151ae0a8a3
commit 022463442b
2 changed files with 6 additions and 1 deletions

View file

@ -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-thing-at-point)
(define-key map (kbd "S") 'magit-stage-all) (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-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 "i") 'magit-ignore-thing-at-point)
(define-key map (kbd "?") 'magit-describe-thing-at-point) (define-key map (kbd "?") 'magit-describe-thing-at-point)
(define-key map (kbd ".") 'magit-mark-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) (interactive)
(magit-run "git" "add" "-u" ".")) (magit-run "git" "add" "-u" "."))
(defun magit-unstage-all ()
(interactive)
(magit-run "git" "reset" "HEAD"))
;;; Branches ;;; Branches
(defun magit-checkout (rev) (defun magit-checkout (rev)

View file

@ -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 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 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 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 Before committing the changes in the staging area, you should write a
short description of them. short description of them.