Skip to content

Nucc/git-select-branch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitSelectBranch

Description

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.

Screenshot 2024-04-13 at 17 52 26 Screenshot 2024-04-13 at 17 54 16 Screenshot 2024-04-13 at 17 52 05

Features

  • 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.

Prerequisites

Installation

Ensure you have Telescope.nvim installed and configured before adding GitSelectBranch.

use {
  'nucc/git-select-branch',
  requires = { {'nvim-telescope/telescope.nvim'} }
}

Using vim-plug

Plug 'nucc/git-select-branch'
Plug 'nvim-telescope/telescope.nvim'

Usage

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 })

Configuration

No additional configuration is needed to start using GitSelectBranch. Customize the key bindings as needed.

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

Select Git branch in Neovim using Telescope

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published