Merge commit 'voins/clean'
This commit is contained in:
commit
62d9f73aea
1 changed files with 7 additions and 0 deletions
7
magit.el
7
magit.el
|
@ -1024,6 +1024,7 @@ Many Magit faces inherit from this one by default."
|
|||
(define-key map (kbd "x") 'magit-reset-head)
|
||||
(define-key map (kbd "X") 'magit-reset-working-tree)
|
||||
(define-key map (kbd "k") 'magit-discard-item)
|
||||
(define-key map (kbd "K") 'magit-clean)
|
||||
(define-key map (kbd "RET") 'magit-visit-item)
|
||||
(define-key map (kbd "SPC") 'magit-show-item-or-scroll-up)
|
||||
(define-key map (kbd "DEL") 'magit-show-item-or-scroll-down)
|
||||
|
@ -2670,4 +2671,10 @@ Prefix arg means justify as well."
|
|||
(erase-buffer)
|
||||
(shell-command (concat magit-git-executable " branch -va") t t)))
|
||||
|
||||
(defun magit-clean ()
|
||||
(interactive)
|
||||
(if (yes-or-no-p "Remove all untracked files and directories? ")
|
||||
(magit-run "git" "clean" "-dxf")))
|
||||
|
||||
|
||||
(provide 'magit)
|
||||
|
|
Loading…
Reference in a new issue