# Gitree

[![Windows build](https://dock-it.dev/Idea-Studios/Gitree/actions/workflows/windows-build.yml/badge.svg?branch=prod)](https://dock-it.dev/Idea-Studios/Gitree/actions?workflow=windows-build.yml)
[![Latest release](https://img.shields.io/gitea/v/release/Idea-Studios/Gitree?gitea_url=https%3A%2F%2Fdock-it.dev&label=release)](https://dock-it.dev/Idea-Studios/Gitree/releases/latest)
[![Platform](https://img.shields.io/badge/platform-Windows_x64-0078D4?logo=windows)](https://dock-it.dev/Idea-Studios/Gitree/releases)
[![C++](https://img.shields.io/badge/C%2B%2B-20-00599C?logo=cplusplus)](https://en.cppreference.com/w/cpp/20)
[![License](https://img.shields.io/badge/license-CC_BY--SA_4.0-lightgrey.svg)](https://dock-it.dev/Idea-Studios/Gitree/src/branch/prod/LICENSE)

A fast, native Git desktop client for Windows.

## Download

Download the current Windows x64 executable from the
[latest release](https://dock-it.dev/Idea-Studios/Gitree/releases/latest), or browse
[all releases](https://dock-it.dev/Idea-Studios/Gitree/releases).

No installer is required: download the executable and run it.

## Use Gitree

Open Gitree, choose **Open repository**, and select a local Git repository. You can
also pass its path when launching from a terminal:

```powershell
.\Gitree-windows-x64.exe C:\path\to\repository
```

Use the sidebar to switch branches and browse refs. Select a commit to inspect its
details and changes. The commit area lets you stage files and create commits.

## Build from source

### Requirements

- Windows 10 or later (x64)
- [Git](https://git-scm.com/download/win)
- [CMake 3.21 or later](https://cmake.org/download/)
- A C++20 compiler: Visual Studio 2022 with the **Desktop development with C++**
  workload, or a recent MinGW-w64 toolchain
- Ninja is optional; `run.bat` uses it automatically when available

Clone the repository with all submodules:

```powershell
git clone --recurse-submodules https://dock-it.dev/Idea-Studios/Gitree.git
cd Gitree
```

If the repository was cloned without `--recurse-submodules`, initialize the
dependencies before configuring the build:

```powershell
git submodule update --init --recursive
```

### Build and run automatically

From a Developer PowerShell or Command Prompt:

```bat
run.bat
```

`run.bat` configures a Release build, builds Gitree, and launches it. Pass a
repository path to open it immediately:

```bat
run.bat C:\path\to\repository
```

### Build with Visual Studio 2022

```powershell
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Release --parallel
.\build\bin\Release\gitree.exe
```

### Build with Ninja

Run these commands in a shell where your compiler is available. For MSVC, use a
Visual Studio Developer PowerShell or Developer Command Prompt.

```powershell
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel
.\build\bin\gitree.exe
```

## License

Gitree is licensed under the [Creative Commons Attribution-ShareAlike 4.0
International license](https://dock-it.dev/Idea-Studios/Gitree/src/branch/prod/LICENSE).
