Skip to content

Installation

Alexander Klee edited this page Dec 18, 2025 · 1 revision

Installation Guide

This guide will help you install git-forest and get it running on your system.

Prerequisites

  • .NET 10 SDK or Runtime - Required to run git-forest
  • Git - Version 2.x or higher
  • Operating System - Windows, macOS, or Linux

Installation Methods

Method 1: .NET Global Tool (Recommended)

The easiest way to install git-forest is as a .NET global tool:

dotnet tool install --global git-forest

Verify the installation:

git-forest --version

Method 2: Install Pre-release Version

To install the latest pre-release version:

dotnet tool install --global git-forest --prerelease

Method 3: Update Existing Installation

If you already have git-forest installed and want to update to the latest version:

dotnet tool update --global git-forest

Method 4: Build from Source

For developers who want to contribute or run the latest development version:

1. Clone the repository:

git clone https://github.com/tweakch/git-forest.git
cd git-forest

2. Build the solution:

dotnet restore
dotnet build --configuration Release

3. Install as a local tool:

dotnet tool install --global --add-source ./src/GitForest.Cli/bin/Release git-forest

Or run directly:

dotnet run --project src/GitForest.Cli -- --version

See Building from Source for detailed development setup instructions.

Command Alias Setup (Optional)

git-forest can be invoked with the full command git-forest or a shorter alias gf.

PowerShell

For current session:

Set-Alias gf git-forest

To persist across sessions, add to your PowerShell profile:

notepad $PROFILE

Add this line:

Set-Alias gf git-forest

Bash / Zsh

For current session:

alias gf='git-forest'

To persist, add to your shell profile (~/.bashrc, ~/.zshrc, or ~/.bash_profile):

echo "alias gf='git-forest'" >> ~/.bashrc
source ~/.bashrc

Windows Command Prompt

Create a batch file named gf.bat in a directory on your PATH:

@echo off
git-forest %*

Verification

After installation, verify that git-forest is working correctly:

# Check version
git-forest --version

# Display help
git-forest --help

# If you set up the alias
gf --version

Post-Installation: Initialize Your First Forest

Once installed, navigate to a git repository and initialize your first forest:

cd /path/to/your/git/repo
git-forest init
git-forest status

See the Quick Start Guide for your next steps.

Troubleshooting

"Command not found" Error

If you get a "command not found" error after installation:

1. Check if .NET tools are in your PATH:

echo $PATH  # Linux/macOS
echo %PATH% # Windows

2. Add .NET tools directory to PATH:

  • Linux/macOS: ~/.dotnet/tools
  • Windows: %USERPROFILE%\.dotnet\tools

Linux/macOS:

export PATH="$PATH:$HOME/.dotnet/tools"

Windows PowerShell:

$env:PATH += ";$env:USERPROFILE\.dotnet\tools"

3. Restart your terminal after modifying PATH.

.NET SDK Not Found

If you don't have .NET 10 installed:

Download and install from:

macOS (Homebrew):

brew install --cask dotnet-sdk

Ubuntu/Debian:

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y dotnet-sdk-10.0

Permission Errors on Linux/macOS

If you encounter permission errors:

sudo chmod +x ~/.dotnet/tools/git-forest

Tool Installation Conflicts

If a previous version conflicts:

# Uninstall old version
dotnet tool uninstall --global git-forest

# Reinstall
dotnet tool install --global git-forest

Updating git-forest

To update to the latest stable release:

dotnet tool update --global git-forest

To update to a pre-release:

dotnet tool update --global git-forest --prerelease

Uninstallation

To remove git-forest from your system:

dotnet tool uninstall --global git-forest

This removes the tool but does not delete any .git-forest/ directories in your repositories.

Next Steps

? Installed git-forest successfully?

Continue to:

Web UI (Optional)

git-forest includes an optional Blazor web interface for visual management:

cd src/GitForest.Web
dotnet run

Then open http://localhost:5000 in your browser.

See Web UI Guide for more details.

Support

Having trouble installing? Check: