The GitPHP guide 🚀
Comprehensive open-source documentation: Self-hosting, Personal Access Tokens, Git & SSH, pull requests, and REST API.
📑
All
📦
📦 Installation
🚀
🚀 Remote Updates & Downloads
NEW
🔑
⭐️ Token Push
🚀
🚀 Quick Start
💻
💻 Git & SSH
🔀
🔀 Pull Requests
📁
📁 Features
⚡️
⚡️ REST API
🛡️
🛡️ Admin & Security
🔧
🔧 Troubleshooting
6 Branches, Compare & Merge
Create a Branch
From the Branches page → New branch; pick the base branch and your new branch name.
Compare
Inspect commits ahead/behind, unified diffs, and automatic merge conflict detection.
Direct Merge
Merge branches directly while preserving the full commit history.
For collaborative workflows and code review prior to merging, use a Pull Request.
7 Pull Requests
From the Pull requests tab → New pull request, select your source and target branches:
- Review the commit list, diff summary, and automatic mergeability.
- Enter a title and description, then open the PR (numbered sequentially #1, #2…).
- Collaborate via conversation comments and inspect the Files changed tab.
- When ready, click Merge pull request to execute the merge.
✅ Merging is powered by the real Git engine (
git merge-tree) with automatic conflict detection.8 Code Review
Open the Files changed tab inside any PR, then click any line in the diff to leave an inline review comment pinned to that exact code line.
Reviewers can use Approve or Request changes to record decisions. If branch protection is enabled, unapproved PRs cannot be merged.
9 Branch Protection
From repository settings → Branch protection, configure strict rules for main branches (e.g. main):
- Block deletion of protected branches.
- Block force-pushes (non-fast-forward updates).
- Require an approved review before merging.
- Optional admin bypass (allow admins to push directly).
🛡️ Rules are enforced server-side via
pre-receive hooks for both Web and Git CLI operations.