CommitFence
Esc
↑ ↓ to moveEnter to open
Getting Started / Installation

Installation

Download, unzip, install the command line, set a repository up and put the hook line in place.

On this page

Download#

Each release on GitHub holds two downloads for every system: the app with the command line beside it, and the command line alone. Both are self-contained, so you do not need .NET to run them. The .NET SDK is needed to review, because a review builds the changed projects.

Version 1.0.0.0 · 23 November 2026 · What's new. SHA256SUMS.txt in the release lists the checksum of every file, and SHA256SUMS.txt.sig is its signature.

Unzip#

Unzip the download where you want the program to stay, since install records the folder it is in.

Install the command line#

Run commitfence install from that folder. It sets a git setting, commitfence.path, to the program's location, which the hook line reads, and puts the program's folder on your PATH for programs started afterwards.

Terminal
$ commitfence install --printWould set the git setting commitfence.path to Q:/CommitFence/commitfence.exe.Would add Q:\CommitFence to your PATH, for programs started after that.exit code 0

The folder here is wherever the download was unzipped: Q:\CommitFence in this run. --print only says what would be done. --no-path leaves the PATH as it is:

Terminal
$ commitfence install --print --no-pathWould set the git setting commitfence.path to Q:/CommitFence/commitfence.exe.Left the PATH as it is.exit code 0

Set a repository up#

In the repository run commitfence init. It writes a commitfence.json with no rules and prints the line to put first in the repository's pre-push hook (with husky, the file .husky/pre-push).

Terminal
$ commitfence initWrote <repository>/commitfence.json, with no rules yet. Add rules with commitfence rules add.Add this line as the first command of the pre-push hook (with husky, the file .husky/pre-push):"$(git config --get commitfence.path)" review --hook pre-push "$@" || exit $?exit code 0

<repository> stands for the full path of the repository's folder.

Hook line
"$(git config --get commitfence.path)" review --hook pre-push "$@" || exit $?

Without the hook#

You can review without the hook: commitfence review --push says what the hook would say for the current branch.

Updating#

To update, download the new release and unzip it over the old one.

The app#

The app is in the download named CommitFence. Start it from a terminal in the repository's folder, or give it the folder as its argument. It opens on the Rules screen.

Something wrong or unclear on this page? Tell us on GitHub