 
 (use-package magit
   :config
-  (add-hook 'magit-post-refresh-hook 'vc-refresh-state)
-  (add-hook 'after-save-hook 'magit-after-save-refresh-status t)
   (with-eval-after-load 'git-rebase
     ;; Vanilla undo has been completely unbound, this reenable undo in
     ;; `git-rebase-mode'

  (defvar watched-git-heads nil
    "A list of .git/logs/HEAD file to watcher mappings.")

  (defun refresh-buffer-base-on-git-state ()
    "Refresh the current buffer base on the current git state."
    (if (and (boundp 'magit-mode) (derived-mode-p 'magit-mode))
        (magit-refresh-buffer)

                 (when (not (string-prefix-p " " (buffer-name buf)))
                   (with-current-buffer buf
                     (when (string-prefix-p vc-root (expand-file-name default-directory))
                       (refresh-git-backed-buffer))))))))))))

  (defun watch-git-head ()
    (let ((file (buffer-file-name)))
