A self-hosted Git server versus a bare repository: you need pull requests
说明与用途
将裸 Git 仓库迁移到 AngusGit,可使用拉取请求、代码审查和分支保护,提升协作效率。
问题
A bare Git repository lacks pull requests, review, and web interface, making collaboration hard when code changes need review before merging into main.
结果
The repository migration enables pull requests, code review, issue linking, and branch protection, improving collaboration and code quality.
工作流
- Create an empty repository on AngusGit (leave README, .gitignore, license unchecked).
- Clone the existing bare repository with
git clone --bare. - Push all branches with
git push --alland all tags withgit push --tagsto the new AngusGit repo. - Rename local main branch if needed (
git branch -m master main). - Have teammates update their remote URL with
git remote set-url origin <new-url>and fetch. - Use AngusGit’s web UI to open pull requests, review, and merge.
- Enable branch protection on main to enforce PRs before merge.
证据
A bare repository stores only Git data. It has no working files you can edit.
Open the repository in a browser, go to the Branches tab, and on the new branch's row click Compare with default branch. Then click Create Pull Request.
The first command uses --all to push every branch. The second uses --tags to push every tag.
Create an empty repository on AngusGit (leave Add a README file, Add .gitignore, and Choose a license unchecked).
- 记录日期: 2026-11-01T04:44:05.353Z