6

I'm aware of C-x v ~ which allows you to see a different revision of the current file, but I would like to visit the file on another branch.

Is this possible with magit, VC or git-timemachine?

alecvn
  • 419
  • 2
  • 12
  • 1
    As you're using git, note that there is no practical difference between a branch name and any arbitrary git commit/revision of your repository. They are all 'refs' representing the repository at a particular point in time. Branches and Tags are simply human-friendly names which point to a ref. So you can use these things interchangeably in most situations. – phils Jul 12 '18 at 13:12

1 Answers1

12

So I was confused because the options to choose from for C-x v ~ only showed older revisions of the file on this particular branch, but you can in fact specify a branch and have that file shown.

Ie. if you want to visit the current file on master:

C-x v ~

Then just specify

master

As suggested by @KyleMeyer, the Magit command for this would be

magit-find-file-other-window
alecvn
  • 419
  • 2
  • 12