4

When using :Glog or other git plugins like :GV (gitv?) and checking revisions or commit you end up in Read-Only mode viewing something like

fugitive:///.git//300ed70aa473b7e8f983a2590c2af908cd0a0621/file

Is there a way to get to the original file in the current working tree?

This is especially handy when using :Glog and stepping back in time, to get back to "now".

1 Answer 1

5

The Gedit command is here for you.

It takes an argument which is the revision you want to use, using the same logic as git-rev-parse (meaning you can use it without argument to get back to your working copy), so, on your file, type

:Gedit

And you're back to your working copy.

References:

  • :h fugitive-:Gedit
  • :h fugitive-revision
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.