View a file's history in Magit?

前端 未结 5 1356
孤城傲影
孤城傲影 2021-01-30 01:18

View the change history of a file using Git versioning talks about other ways of viewing history of a file in Git.

Can it be done in Emacs Magit?

5条回答
  •  野的像风
    2021-01-30 02:09

    Open your magit-status buffer, by typing M-x magit-status (I used to have this bound to C-. C-g because it is used all the time. These days, I use Spacemacs so it's g s)

    1. Type l to get log viewing option
    2. Type -- to set the "Limit to files" option (used to be =f)
    3. Enter the file path you wish to view history for
    4. Type l to view the log of the current branch

    If you're using Spacemacs, you can get the history of the currently visited file using g f h

提交回复
热议问题