Home > Software engineering >  nvim workflow with git
nvim workflow with git

Time:12-19

I've been using nvim (lunarVim) for my private projects (mainly python) previously and it was convenient.

Since I was hired I have to collaborate in git and it became very difficult.

Could you recommend me some plugins of configs for the following purposes (or maybe tell about your workflow in general if you achieved that ideal IDE nvim level):

  1. Efficiently view the history of a branch
  2. Easily compare 2 files from different branches
  3. Also compare 2 files in your local repo.

I do understand that all of the problems are solvable if I had a good understanding of the git commands and theory. I need something to simplify my suffering for now:)

CodePudding user response:

you can use Neogit or vim-fugitive but I prefer using lazygit outside of vim

CodePudding user response:

Another interesting plugin is diffview.nvim which adds the :DiffviewFileHistory command which shows you all the changes of a file (and branch). As explained by the maintainer here you can use :DiffviewFileHistory --base=LOCAL % (% means the current file) to open up the the current file on the one side of the panel while the other panel holds the code of the other commits.

  • Related