0

I have a git repository: ~/home/foo/repo

I mounted core to another directory:

mount --bind ~/home/foo/repo ~/home/bar

Now I want to edit my code with vim and use vim-fugitive. vim ~/home/bar/myCode.txt; :Gblame

1

According to vim-fugitive sources, you can use Fugitive commands for any file that belongs to git index. E.g.

cd ~
vim ~/home/foo/repo/README.md # works
vim ~/home/bar/README.md # works too
  • Well, It is not working for me. I do not think that the file belongs to the git index because it is outside of my repository and I am accessing this file as a link. – Kfir Jul 22 at 8:23
  • well ... do you have .git. directory ? ls ~/home/bar/.git – Yasen Jul 22 at 19:57
  • This is exactly my problem. I want to access it outside of the .git directory tree. ~/home/foo/repo/.git exists and ~/home/bar/.git does not – Kfir Jul 23 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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