Git diff on Vim with fugitive
Published on 03 Jul 2020
To compare a file across branches:
GIVEN:
my_file.rb
on branchfoo
my_file.rb
on branchbar
- Install the fugitive plugin by Tim Pope.
- Open the
my_file.rb
in Neovim. :Gdiff bar:%
(branch isbar
, file is current file[%])