{"id":20533643,"url":"https://github.com/echasnovski/mini-git","last_synced_at":"2025-08-21T22:31:30.485Z","repository":{"id":241273727,"uuid":"803883790","full_name":"echasnovski/mini-git","owner":"echasnovski","description":"Git integration. Part of 'mini.nvim' library. ","archived":false,"fork":false,"pushed_at":"2024-09-26T13:59:23.000Z","size":63,"stargazers_count":48,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-10T23:50:25.500Z","etag":null,"topics":["lua","mini-nvim","neovim","neovim-plugin"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/echasnovski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-21T14:46:39.000Z","updated_at":"2024-11-12T08:18:22.000Z","dependencies_parsed_at":"2024-06-23T01:38:14.340Z","dependency_job_id":"4ba9e8cb-3ef7-41ff-ab54-e88461f60f7c","html_url":"https://github.com/echasnovski/mini-git","commit_stats":null,"previous_names":["echasnovski/mini-git"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echasnovski%2Fmini-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echasnovski%2Fmini-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echasnovski%2Fmini-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/echasnovski%2Fmini-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/echasnovski","download_url":"https://codeload.github.com/echasnovski/mini-git/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230537062,"owners_count":18241515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","mini-nvim","neovim","neovim-plugin"],"created_at":"2024-11-16T00:22:58.015Z","updated_at":"2025-08-21T22:31:30.478Z","avatar_url":"https://github.com/echasnovski.png","language":"Lua","readme":"\u003cdiv align=\"center\"\u003e \u003cimg src=\"https://github.com/echasnovski/media/blob/main/mini.nvim/logo-2/logo-git_readme.png\" alt=\"mini.git\"/\u003e \u003c/div\u003e\n\n\u003c!-- badges: start --\u003e\n[![GitHub license](https://badgen.net/github/license/echasnovski/mini.nvim)](https://github.com/echasnovski/mini.nvim/blob/main/LICENSE)\n\u003c!-- badges: end --\u003e\n\n### Git integration\n\nSee more details in [Features](#features) and [help file](doc/mini-git.txt).\n\n---\n\n⦿ This is a part of [mini.nvim](https://github.com/echasnovski/mini.nvim) library. Please use [this link](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-git.md) if you want to mention this module.\n\n⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of 'mini.nvim'.\n\n⦿ See the repository page to learn about common design principles and configuration recipes.\n\n---\n\nIf you want to help this project grow but don't know where to start, check out [contributing guides of 'mini.nvim'](https://github.com/echasnovski/mini.nvim/blob/main/CONTRIBUTING.md) or leave a Github star for 'mini.nvim' project and/or any its standalone Git repositories.\n\n## Demo\n\nhttps://github.com/echasnovski/mini.nvim/assets/24854248/3c2b34cd-f04f-4e30-9ca4-1ff51e2d65a2\n\n**Note**: This demo uses custom `vim.notify()` from [mini.notify](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-notify.md) and diff line number highlighting from [mini.diff](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-diff.md).\n\n## Features\n\n- Automated tracking of [Git](https://git-scm.com/) related data: root path, status, HEAD, etc. Exposes buffer-local variables for convenient use in statusline.\n\n- `:Git` command for executing any `git` call inside file's repository root with deeper current instance integration (show output as notification/buffer, use to edit commit messages, etc.).\n\n- Helper functions to inspect Git history:\n    - `MiniGit.show_range_history()` shows how certain line range evolved.\n    - `MiniGit.show_diff_source()` shows file state as it was at diff entry.\n    - `MiniGit.show_at_cursor()` shows Git related data depending on context.\n\nWhat it doesn't do:\n\n- Replace fully featured Git client. Rule of thumb: if feature does not rely on a state of current Neovim (opened buffers, etc.), it is out of scope. For more functionality, use either ['mini.diff'](https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-diff.md) or fully featured Git client.\n\nTo read more information, see these tags in help file:\n- `*:Git*`\n- `*MiniGit-examples*`\n- `*MiniGit.enable()*`\n- `*MiniGit.get_buf_data()*`\n\n## Installation\n\nThis plugin can be installed as part of 'mini.nvim' library (**recommended**) or as a standalone Git repository.\n\nThere are two branches to install from:\n\n- `main` (default, **recommended**) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).\n- `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.\n\nHere are code snippets for some common installation methods (use only one):\n\n\u003cdetails\u003e\n\u003csummary\u003eWith \u003ca href=\"https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-deps.md\"\u003emini.deps\u003c/a\u003e\u003c/summary\u003e\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eGithub repo\u003c/th\u003e \u003cth\u003eBranch\u003c/th\u003e \u003cth\u003eCode snippet\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003e'mini.nvim' library\u003c/td\u003e \u003ctd\u003eMain\u003c/td\u003e \u003ctd rowspan=2\u003e\u003ci\u003eFollow recommended 'mini.deps' installation\u003c/i\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003eStandalone plugin\u003c/td\u003e \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003eadd('echasnovski/mini-git')\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003eadd({ source = 'echasnovski/mini-git', checkout = 'stable' })\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWith \u003ca href=\"https://github.com/folke/lazy.nvim\"\u003efolke/lazy.nvim\u003c/a\u003e\u003c/summary\u003e\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eGithub repo\u003c/th\u003e \u003cth\u003eBranch\u003c/th\u003e \u003cth\u003eCode snippet\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003e'mini.nvim' library\u003c/td\u003e \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003e{ 'echasnovski/mini.nvim', version = false },\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003e{ 'echasnovski/mini.nvim', version = '*' },\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003eStandalone plugin\u003c/td\u003e \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003e{ 'echasnovski/mini-git', version = false, main = 'mini.git' },\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003e{ 'echasnovski/mini-git', version = '*', main = 'mini.git' },\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWith \u003ca href=\"https://github.com/junegunn/vim-plug\"\u003ejunegunn/vim-plug\u003c/a\u003e\u003c/summary\u003e\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eGithub repo\u003c/th\u003e \u003cth\u003eBranch\u003c/th\u003e \u003cth\u003eCode snippet\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003e'mini.nvim' library\u003c/td\u003e \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003ePlug 'echasnovski/mini.nvim'\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003ePlug 'echasnovski/mini.nvim', { 'branch': 'stable' }\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003eStandalone plugin\u003c/td\u003e \u003ctd\u003eMain\u003c/td\u003e \u003ctd\u003e\u003ccode\u003ePlug 'echasnovski/mini-git'\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003eStable\u003c/td\u003e \u003ctd\u003e\u003ccode\u003ePlug 'echasnovski/mini-git', { 'branch': 'stable' }\u003c/code\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n**Important**: don't forget to call `require('mini.git').setup()` to enable its functionality.\n\n**Note**: if you are on Windows, there might be problems with too long file paths (like `error: unable to create file \u003csome file name\u003e: Filename too long`). Try doing one of the following:\n- Enable corresponding git global config value: `git config --system core.longpaths true`. Then try to reinstall.\n\n## Default config\n\n```lua\n-- No need to copy this inside `setup()`. Will be used automatically.\n{\n  -- General CLI execution\n  job = {\n    -- Path to Git executable\n    git_executable = 'git',\n\n    -- Timeout (in ms) for each job before force quit\n    timeout = 30000,\n  },\n\n  -- Options for `:Git` command\n  command = {\n    -- Default split direction\n    split = 'auto',\n  },\n}\n```\n\n## Similar plugins\n\n- [tpope/vim-fugitive](https://github.com/tpope/vim-fugitive)\n- [NeogitOrg/neogit](https://github.com/NeogitOrg/neogit)\n- [lewis6991/gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)\n","funding_links":[],"categories":["Lua"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechasnovski%2Fmini-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fechasnovski%2Fmini-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fechasnovski%2Fmini-git/lists"}