This plugins for manage git in neovim. Like commit, push, PR ,etc.
- nvim 0.8+ (recommendation)
- nvim-telescope/telescope.nvim
if some plugins not found you can still used it, but you can use it
- lazy.nvim
{
'muryp/muryp-git.nvim',
config = function()
--PATH SSH DIR
_G.SSH_DIR = vim.fn.getenv 'HOME' .. '/.ssh/github'
--PATH GIT DIR for cache
_G.MURYP_GIT_DIR = vim.fn.getenv 'HOME' .. '/.muryp/nvim/git/'
require 'muryp-git'
end,
}
see example configs in here
before use api you need to
local git = require('muryp-git.api')
git.branch.create
=> CREATEgit.branch.renameCurr
=> RENAME_CURRgit.branch.renameList
=> RENAME_LISTgit.branch.rm
=> REMOVE
git.flow { isRebase = true }
=> CHECKOUT AND REBASEgit.flow { isMerge = true }
=> CHECKOUT AND MERGEgit.flow { isSquash = true }
=> CHECKOUT AND SQUASH
git.commit { isAmend = true }
=> COMMITgit.push { isUseSsh = true, isPull = true, isCommit = true, isAddAll = true, }
=> ADD,COMMIT,PUSH,PULL
isUseSsh => use ssh to pull, change to false if you not use it.
git.pull { isUseSsh = true, isSquash = true, }
=> PULL AND SQUASHgit.pull { isUseSsh = true, isRebase = true, }
=> PULL AND REBASEgit.pull { isUseSsh = true, isMerge = true, }
=> PULL AND MERGE
git.merge
=> MERGEgit.squash
=> SQUASHgit.rebase
=> REBASE
git.remote.add
=> CREATEgit.remote.rename
=> RENAMEgit.remote.rm
=> REMOVEgit.remote.sshToHttp
=> SSH_TO_HTTPgit.remote.httpToSsh
=> HTTP_TO_SSHgit.remote.open
=> OPEN IN BROWSER
The muryp-git-setup
plugin is distributed under the Apache License 2.0. Please refer to the LICENSE
file for more information about this license.
We greatly appreciate contributions from anyone can produce issue or maintaine code to help this repo. Please read CONTRIBUTE.md
for more info.