GitSelectBranch is a Neovim plugin designed to enhance your Git workflow. It integrates with Telescope.nvim to allow users to seamlessly list, switch to, or create Git branches directly within Neovim. Keyboard shortcut <leader>gb
also comes as default.
- List Branches: View all available Git branches in a Telescope picker.
- Switch Branches: Easily switch between branches with a simple selection.
- Create Branches: Prompt to create a new branch if it doesn't exist and switch to it.
- Neovim (0.5.0 or newer)
- Telescope.nvim
- Git installed on your system
Ensure you have Telescope.nvim installed and configured before adding GitSelectBranch.
Using packer.nvim
use {
'nucc/git-select-branch',
requires = { {'nvim-telescope/telescope.nvim'} }
}
Plug 'nucc/git-select-branch'
Plug 'nvim-telescope/telescope.nvim'
After installation, you can use the plugin with the following command:
:SelectGitBranch
You can also execute this command by <leader>gb
or bind it to a keyboard shortcut in your init.vim or init.lua:
nnoremap <leader>Gs :SelectGitBranch<CR>
vim.api.nvim_set_keymap('n', '<leader>Gs', '<cmd>SelectGitBranch<CR>', { noremap = true, silent = true })
No additional configuration is needed to start using GitSelectBranch. Customize the key bindings as needed.
Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
This project is licensed under the MIT License - see the LICENSE.md file for details.