
How to Set Up a Private Git Server With Gitea the Right Way
Set up a self hosted Git server with Gitea: Docker Compose, SQLite or Postgres, SSH access, a reverse proxy, backups and first admin settings.
Tag
29 posts

Set up a self hosted Git server with Gitea: Docker Compose, SQLite or Postgres, SSH access, a reverse proxy, backups and first admin settings.

Choose a git branch naming convention that works: prefixes, issue IDs, allowed characters, length, and how to enforce the rule with a hook or CI check.

Use git tag for releases: lightweight versus annotated tags, signing, pushing to a remote, listing and deleting, and naming versions with semantic versioning.

Use git subtree to include another repository inside yours as normal files: add, pull, push back, squash history, and compare it with submodules.

Write Git hooks for pre-commit, commit-msg and pre-push, share them with core.hooksPath, bypass them safely, and know what hooks cannot enforce for a team.

Create Git aliases for status, log, undo and branch cleanup, use the bang prefix for shell commands, pass arguments correctly, and keep them in dotfiles.

Change a Git remote URL from HTTPS to SSH with git remote set-url: find the SSH address, test the connection, and fix credential and key problems.

Use git submodule to pin another repository inside yours: add, clone, update and remove it, and learn which workflows make submodules painful.

Set up SSH keys for GitHub and GitLab: generate an Ed25519 key, add it to the agent, upload the public key, test the connection, and use one key per host.

Configure a Git credential helper to keep HTTPS tokens in the OS keychain or a memory cache, avoid plain text storage, and prefer SSH keys or tokens.

Sign Git commits and tags with a GPG key or an SSH key, configure Git, verify signatures locally with allowed signers, and see the Verified badge on GitHub.

Use git filter-repo to rewrite history safely: remove files, split a directory into its own repository, rename paths and authors, and skip filter-branch.