diff --git a/README.md b/README.md index 1eb5026..19945c2 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,63 @@ Instead of manually finding and deleting stale branches, this tool: ## Installation +### Pre-built binaries + +Download the binary for your platform from the [latest release](/Reproog/cleanupGoneBranches/releases/latest). + +The binary has no dependencies besides Git, but it must be **executable** and either called directly or available in your system `PATH`. + +#### Windows + +1. Download `cleanupGoneBranches-windows_amd64.exe`. +2. Rename it to `cleanupGoneBranches.exe` (optional, but enables the short command name). +3. Move it to a folder that is already in your `PATH` (e.g. `C:\Windows`), **or** add its folder to the `PATH`: + - Graphically: *System → Environment Variables → Path → Edit → New* + - Or in PowerShell (user scope, applies to new terminals): + + ```powershell + [Environment]::SetEnvironmentVariable( + "Path", + [Environment]::GetEnvironmentVariable("Path", "User") + ";C:\Tools\cleanupGoneBranches", + "User") + ``` + +4. Verify: + + ```powershell + cleanupGoneBranches --help + ``` + +> **Note:** If Windows SmartScreen warns about the unsigned executable, choose *More info → Run anyway*. + +#### Linux + +```bash +sudo mv cleanupGoneBranches-linux_amd64 /usr/local/bin/cleanupGoneBranches +sudo chmod +x /usr/local/bin/cleanupGoneBranches + +# Verify +cleanupGoneBranches --help +``` + +Without root access, use `~/.local/bin` instead and make sure it is in your `PATH`. + +#### macOS + +```bash +sudo mv cleanupGoneBranches-darwin_arm64 /usr/local/bin/cleanupGoneBranches +sudo chmod +x /usr/local/bin/cleanupGoneBranches +xattr -d com.apple.quarantine /usr/local/bin/cleanupGoneBranches +``` + +The `xattr` command removes the Gatekeeper quarantine flag for this unsigned binary; without it, macOS may refuse to run it. + +Alternatively, keep it anywhere and invoke it by full path: + +```bash +/path/to/cleanupGoneBranches --help +``` + ### Build from source ```bash @@ -42,6 +99,9 @@ Or install directly: go install ``` +The resulting binary is placed in your Go bin directory (`go env GOBIN` or `GOPATH/bin`), which must be in your `PATH` for the `cleanupGoneBranches` command to work globally. + + --- ## Usage