Often, when I switch branches in git, if the files are open in emacs, then emacs asks if I want to revert them (as it thinks they\'ve changed on disk) even though the conten
Try the revbufs package:
revbufs.el
is a tiny Emacs package that safely reverts your buffers when you have files being edited both in Emacs and via external tools (e.g., code generators such as Jomtool)...
Perhaps you'd like the global auto-revert mode. Try running global-auto-revert-mode
and if you like it you can add (global-auto-revert-mode)
to your ~/.emacs file.
Magit package do this automatically, when you activate magit-ionotify-mode (inotify need emacs 24.4 on linux). Its description you can find here.