Using emacs (and magit?) to visit a file in given commit/branch/etc

前端 未结 4 1559
无人及你
无人及你 2021-01-30 22:34

If I want to see how foo.bar looked like in some certain commit then I can invoke:

git show :foo.bar         


        
4条回答
  •  一整个雨季
    2021-01-30 23:08

    The canonical way to do that in Emacs is to use VC: C-x v ~ from the file's buffer will ask you for a revision and then show that file as it was at that revision. It should work for any control system supported by VC, such as Git, Bzr, ...

提交回复
热议问题