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[%])
all tags
activerecord android annoyances api apt arch array artix atom az3w backend bash blog browser bug callback career cli cloud code coding config configuration cp crud css database db design devops django email erp filter fugitive gif gist git gnome grep hebrew http ide isbn-fetcher iso javascript job search js kanban kanban\ kindle koans linux logger manjaro map markdown microservices mobi mtp neovim nodejs packages pastbin patch post python rails reduce refactoring rest routes rspec ruby scripting security sed shell sql string_replacement study tdd terminal testing version_control vim walkthrough workflow