FarNet.GitKit
1.3.19
Prefix Reserved
See the version list below for details.
dotnet add package FarNet.GitKit --version 1.3.19
NuGet\Install-Package FarNet.GitKit -Version 1.3.19
<PackageReference Include="FarNet.GitKit" Version="1.3.19" />
<PackageVersion Include="FarNet.GitKit" Version="1.3.19" />
<PackageReference Include="FarNet.GitKit" />
paket add FarNet.GitKit --version 1.3.19
#r "nuget: FarNet.GitKit, 1.3.19"
#:package FarNet.GitKit@1.3.19
#addin nuget:?package=FarNet.GitKit&version=1.3.19
#tool nuget:?package=FarNet.GitKit&version=1.3.19
FarNet.GitKit
Far Manager git helpers based on LibGit2Sharp
About
GitKit is the FarNet module for git operations in Far Manager. GitKit uses LibGit2Sharp and git is not needed as such. Git may be optionally used for getting credentials.
Project FarNet
- Wiki: https://github.com/nightroman/FarNet/wiki
- Site: https://github.com/nightroman/FarNet
- Author: Roman Kuzmin
Install
- Far Manager
- Package FarNet
- Package FarNet.GitKit
How to install and update FarNet and modules
https://github.com/nightroman/FarNet#readme
Commands
GitKit commands start with gk:. Commands are invoked in the command line or
using F11 / FarNet / Invoke or defined in the user menu and file associations.
Command parameters are key=value pairs separated by semicolons, using the
connection string format
gk:command [key=value] [; key=value] ...
gk:@ <command file>
Common parameters
Repo=<path>Specifies the existing repository path.
Default: the current panel directory.
All commands
- gk:blame
- gk:branches
- gk:cd
- gk:changes
- gk:checkout
- gk:clone
- gk:commit
- gk:commits
- gk:config
- gk:edit
- gk:init
- gk:pull
- gk:push
- gk:status
gk:blame
Shows the specified file line commits in the special editor.
Parameters
Path=<string>Specifies the file to blame. Default: the cursor file.
IsGitPath=<bool>Tells to treat
Pathas git path.
Keys and actions
EnterOpens the changes panel for the caret line commit.
gk:branches
This command opens Branches panel.
gk:cd
This command navigates to the specified repository item, directory or file.
Parameters
Path=<string>Specifies the path relative to the working tree directory.
Default: the working tree directory.If the path specifies an existing file then the command navigates to its directory panel and sets the cursor to this file.
gk:changes
This command opens Changes panel.
Parameters
Kind=<enum>Specifies the changes kind
NotCommitted: includes all not committed changes, i.e.NotStagedandStagedNotStaged: not staged changes (git working directory)Staged: staged changes (git index)Head: last committed changesLast: (default)NotCommittedchanges if any, or elseHeadchanges
gk:checkout
This command switches to the specified branch.
Parameters
Branch=<string>The branch name to switch to.
Default: input dialog.If the branch does not exists then it is automatically created from the head branch, with a confirmation dialog.
gk:clone
This command clones the specified repository.
Parameters
Url=<string>(required)Specifies the remote repository.
Path=<string>Specifies the local path to clone into.
Default: the current panel directory.Depth=<int>Specifies the cloning depth.
Default: 0 (full clone).IsBare=<bool>Tells to clone a bare repository.
NoCheckout=<bool>Tells not to checkout after cloning.
RecurseSubmodules=<bool>Tells to recursively clone submodules.
gk:commit
This command commits changes.
Parameters
Message=<string>The commit message. If it is set then the command commits immediately.
If the message is empty then the non-modal editor is opened for the message. If
CommentaryCharis set then the initial text contains change comments. When the editor closes the command commits.All=<bool>Tells to stage all changes before committing.
AllowEmptyCommit=<bool>Tells to allow creation of an empty commit.
AmendPreviousCommit=<bool>Tells to amend the previous commit.
PrettifyMessage=<bool>Tells to prettify the message by stripping leading and trailing empty lines, trailing spaces, and collapsing consecutive empty lines.
PrettifyMessageis ignored ifCommentaryCharis set.CommentaryChar=<char>The starting line char used to identify commentaries in the commit message. If set (usually to "#"), all lines starting with this char will be removed.
CommentaryCharimpliesPrettifyMessage=true.
Examples
Commit all changes, compose a new message in the editor
gk:commit All=true; CommentaryChar=#
Amend with all changes, modify the old message in the editor
gk:commit All=true; CommentaryChar=#; AmendPreviousCommit=true
gk:commits
This command opens Commits panel.
Parameters
Path=<string>Tells to show commits including the specified file system or git path. Use "?" for the panel cursor file or directory.
When
Pathis omitted, the head branch commits are shown.IsGitPath=<bool>Tells to treat
Pathas git path.
gk:config
This command shows all config values (global, local) in the special editor.
Keys and actions
EnterShows the input box for changing the caret line value.
InsShows the input box for a new config value.
DelDeletes the caret line config value.
Notes
Git config supports multivalued keys and GitKit shows them in the editor. But changes are limited to single value keys. In other cases edit config files directly.
For example, open the local config directly
gk:edit path=.git/config
gk:edit
This command opens the specified repository file in the editor.
Parameters
Path=<string>Specifies the repository file path relative to the root.
Default: input dialog.Examples
README.md- the rootREADME.md.git\config- the local configuration file.git\COMMIT_EDITMSG- the last edited commit message
gk:init
This command creates a new repository.
Parameters
Path=<string>Specifies the new repository directory.
Default: the current panel directory.IsBare=<bool>Tells to create a bare repository.
gk:pull
This command pulls the head branch.
gk:push
This command pushes the head branch, with a confirmation dialog.
gk:status
This command prints the repository information like change summary, commit hash, head branch, similar branches, commit message.
Parameters
ShowFiles=<bool>Tells to print changed file statuses and paths before the summary line.
Panels
GitKit provides several panels for browsing and operating
Branches panel
This panel shows the repository branches, local and remote.
Branch marks: * head, r remote, = tracked same as remote, < tracked older, > tracked newer, ? tracked orphan.
The panel is opened by the command gk:branches.
Keys and actions
EnterOpens the cursor branch Commits panel.
ShiftEnterCheckouts the cursor branch. For the local branch, makes it the head branch. For the remote branch, creates a new branch from it and makes it the head branch.
ShiftF5Creates a new branch from the cursor branch.
ShiftF6Renames the cursor branch.
F7Creates and checkouts a new branch from the head branch. Note that the head branch is with
*, not the cursor. To copy the cursor branch, useShiftF5.F8,DelSafely deletes selected local tracking branches.
Remote, non-tracking, tracking with new commits are not deleted.
ShiftF8,ShiftDelDeletes selected branches including remote, non-tracking, tracking with new commits.
See also Menu.
Commits panel
This panel shows branch or path commits.
Commits are shown by pages of CommitsPageLimit, see Settings.
The panel is opened from the branches panel or by the command gk:commits.
Keys and actions
EnterOpens the cursor commit Changes panel.
PgDnAt the last shown commit, loads the next page commits.
PgUpAt the first shown commit, loads the previous page commits.
See also Menu.
Changes panel
This panel shows changed files.
The panel is opened from the commits panel or by the menu "Compare branches" and "Compare commits" or by the command gk:changes.
Keys and actions
EnterOpens the diff tool specified by the setting
DiffTool.F3,F4Opens the diff patch in the viewer or editor.
AltF4If the cursor change file exists, opens this file in the editor.
See also Menu.
Menu
Tip info (main menu, branches panel, commits panel)
Shows the tip or cursor commit info and buttons to copy: SHA-1, Info (shown), Full (full commit message), Short (short commit message).
Push branch (branches panel, commits panel)
Branches panel: Pushes the cursor branch, with a confirmation dialog.
Commits panel: Pushes the commits branch, with a confirmation dialog.
Merge branch (branches panel)
Merges the cursor branch into the head branch, with a confirmation dialog.
Compare branches (branches panel)
Compares the cursor branch with the selected branch and opens the changes panel. If nothing is selected then the head branch is used.
Create branch (commits panel)
Creates a new branch from the cursor commit.
Compare commits (commits panel)
Compares the cursor commit with the selected commit and opens the changes panel. If nothing is selected then the tip commit is used.
Edit file (changes panel)
If the cursor change file exists, opens this file in the editor.
Blame file
Shows the cursor file line commits in the editor, see gk:blame.
Commit log
Opens the panel with commits including the cursor file or directory path.
Help
Shows GitKit help.
Settings
Settings editor: F11 / FarNet / Settings / GitKit
DiffTool and DiffToolArguments
Specify the diff tool and arguments used to compare changed files.
In arguments use %1 and %2 as file path substitutes.
Environment variables are expanded.
VSCode is used as the default diff tool
%LOCALAPPDATA%\Programs\Microsoft VS Code\bin\code.cmd
--diff "%1" "%2"
File revisions for diff are created in "%TEMP%\FarNet.GitKit". To avoid ceremonies and some known issues, files are not deleted. As a result, files are reused instead of creating again and again.
UseGitCredentials
If true, tells to use git credentials for remote tasks.
See Credentials for details.
Default: false.
CommitsPageLimit
Maximum number of commits per panel pages.
Default: 100.
ShaPrefixLength
The number of chars for truncated commit SHA.
Default: 7.
Credentials
Remote git hosts may require credentials, user name and password. GitKit offers two ways, with some advantages and disadvantages.
With UseGitCredentials set to false, an input dialog is used. Enter user name
and password and optionally save them for later use. The environment variable
GitKit_User is used for keeping credentials.
Alternatively, if you have git installed and available in the path, set
UseGitCredentials to true in order to use git for getting credentials.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.4.9 | 176 | 10/29/2025 |
| 1.4.8 | 163 | 10/21/2025 |
| 1.4.7 | 157 | 10/21/2025 |
| 1.4.6 | 164 | 10/20/2025 |
| 1.4.5 | 159 | 10/20/2025 |
| 1.4.4 | 101 | 10/19/2025 |
| 1.4.3 | 143 | 10/17/2025 |
| 1.4.2 | 149 | 10/17/2025 |
| 1.4.1 | 154 | 10/16/2025 |
| 1.4.0 | 161 | 10/16/2025 |
| 1.3.20 | 164 | 10/14/2025 |
| 1.3.19 | 85 | 10/11/2025 |
| 1.3.18 | 166 | 10/8/2025 |
| 1.3.17 | 161 | 10/7/2025 |
| 1.3.16 | 167 | 9/21/2025 |
| 1.3.15 | 205 | 6/3/2025 |
| 1.3.14 | 185 | 5/29/2025 |
| 1.3.13 | 180 | 5/29/2025 |
| 1.3.12 | 190 | 5/27/2025 |
| 1.3.11 | 174 | 5/26/2025 |
| 1.3.10 | 258 | 4/17/2025 |
| 1.3.9 | 301 | 3/4/2025 |
| 1.3.8 | 165 | 3/2/2025 |
| 1.3.7 | 175 | 2/20/2025 |
| 1.3.6 | 167 | 2/17/2025 |
| 1.3.5 | 177 | 2/5/2025 |
| 1.3.4 | 148 | 1/8/2025 |
| 1.3.3 | 172 | 1/1/2025 |
| 1.3.2 | 190 | 12/29/2024 |
| 1.3.1 | 178 | 12/26/2024 |
| 1.3.0 | 155 | 12/24/2024 |
| 1.2.1 | 165 | 12/23/2024 |
| 1.2.0 | 167 | 12/21/2024 |
| 1.1.2 | 193 | 12/14/2024 |
| 1.1.1 | 185 | 12/8/2024 |
| 1.1.0 | 167 | 12/4/2024 |
| 1.0.3 | 181 | 10/26/2024 |
| 1.0.2 | 293 | 4/20/2024 |
| 1.0.1 | 317 | 1/13/2024 |
| 1.0.0 | 295 | 11/19/2023 |
| 0.9.7 | 346 | 11/1/2023 |
| 0.9.6 | 268 | 10/27/2023 |
| 0.9.5 | 281 | 10/26/2023 |
| 0.9.4 | 291 | 10/25/2023 |
| 0.9.3 | 367 | 5/16/2023 |
| 0.9.2 | 258 | 5/3/2023 |
| 0.9.1 | 244 | 5/2/2023 |
| 0.9.0 | 271 | 5/1/2023 |
| 0.8.6 | 265 | 4/30/2023 |
| 0.8.5 | 256 | 4/29/2023 |
| 0.8.4 | 245 | 4/28/2023 |
| 0.8.3 | 268 | 4/27/2023 |
| 0.8.2 | 257 | 4/27/2023 |
| 0.8.1 | 262 | 4/26/2023 |
| 0.8.0 | 262 | 4/26/2023 |
| 0.7.8 | 272 | 4/24/2023 |
| 0.7.7 | 272 | 4/23/2023 |
| 0.7.6 | 268 | 4/23/2023 |
| 0.7.5 | 275 | 4/23/2023 |
| 0.7.4 | 261 | 4/21/2023 |
| 0.7.3 | 275 | 4/21/2023 |
| 0.7.2 | 276 | 4/21/2023 |
| 0.7.1 | 285 | 4/19/2023 |
| 0.7.0 | 285 | 4/19/2023 |
| 0.6.5 | 309 | 4/18/2023 |
| 0.6.4 | 271 | 4/18/2023 |
| 0.6.3 | 254 | 4/18/2023 |
| 0.6.2 | 278 | 4/17/2023 |
| 0.6.1 | 279 | 4/16/2023 |
| 0.6.0 | 285 | 4/16/2023 |
| 0.5.3 | 289 | 4/15/2023 |
| 0.5.2 | 285 | 4/15/2023 |
| 0.5.1 | 259 | 4/15/2023 |
| 0.5.0 | 278 | 4/14/2023 |
| 0.4.0 | 298 | 4/13/2023 |
| 0.3.2 | 288 | 4/12/2023 |
| 0.3.1 | 292 | 4/12/2023 |
| 0.3.0 | 284 | 4/12/2023 |
| 0.2.4 | 275 | 4/11/2023 |
| 0.2.3 | 294 | 4/11/2023 |
| 0.2.2 | 285 | 4/11/2023 |
| 0.2.1 | 282 | 4/11/2023 |
| 0.2.0 | 288 | 4/11/2023 |
| 0.1.0 | 294 | 4/10/2023 |
| 0.0.3 | 301 | 4/9/2023 |
| 0.0.2 | 289 | 4/9/2023 |
| 0.0.1 | 286 | 4/8/2023 |