Git远程仓库协作
远程仓库协作指南
核心概念
- 远程仓库:托管在服务器上的共享仓库(如GitHub/GitLab)
- 克隆仓库:
git clone <url> - 远程分支:
origin/main形式的远程跟踪分支
常用操作
1 | # 添加远程仓库 |
协作流程
- 每日开始前执行
git pull --rebase - 功能开发使用特性分支
- 通过Pull Request发起合并请求
- 使用
git rebase -i整理提交历史 - 定期清理远程已合并分支
git remote prune origin
- Title: Git远程仓库协作
- Author: 清夏晚风
- Created at : 2026-01-13 16:48:23
- Updated at : 2026-01-13 16:48:23
- Link: https://blog.kimikkorow.eu.org/版本控制管理/Git/Git远程仓库协作/
- License: This work is licensed under CC BY-NC-SA 4.0.