Skip to content

Find which files and preview what changes have been made on your branch

License

Notifications You must be signed in to change notification settings

mrloop/telescope-git-branch.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

telescope-git-branch

Telescope Git Branch is a Telescope extension that searches a Git branch for files which are different from the default branch, previews a diff of the changes and allows you to open files that are different from the default branch.

screenshot

The telescope-git-branch.nvim extension is great for working with feature branches, where you want to easily see the differences between the default branch and the feature branch. It lets you search for differences across multiple commits on the same branch.

Installation

You can install these plugin using your favorite vim package manager, e.g. vim-plug and lazy.

lazy:

{
    'mrloop/telescope-git-branch.nvim'
}

vim-plug

Plug 'https://gitlab.com/mrloop/telescope-git-branch.nvim'

Usage

Activate the custom Telescope commands and git_branch extension by adding

require('telescope').load_extension('git_branch')

somewhere after your require('telescope').setup() call. This is typically all you need to configure the plugin.

The following Telescope extension commands are provided:

:Telescope git_branch

These commands can also be used from your init.lua.

For example, to bind files to <leader>gf use:

-- Search for the files with differences to default branch.
vim.keymap.set({'n', 'v'}, '<leader>gf', function()
    require('git_branch').files()
end)

About

Find which files and preview what changes have been made on your branch

Topics

Resources

License

Stars

Watchers

Forks

Languages