Git-TFS 是一个桥接工具,允许开发团队在 Git 和 Team Foundation Server (TFS) 或 Azure DevOps (以前称为 Visual Studio Team Services, VSTS) 之间进行交互。它使团队能够使用 Git 作为本地版本控制系统,同时与中央 TFS 服务器保持同步。
git tfs install
git tfs clone http://tfs-server:8080/tfs/DefaultCollection $/Project/Main --branches=all
原因:TFS 服务器上的变更与本地 Git 仓库不一致
解决方案:
git tfs pull --rebase
# 解决冲突后
git rebase --continue
git tfs rcheckin
原因:TFS 对二进制文件处理不如 Git 高效
解决方案:
git tfs quick-clone
只获取最新版本原因:默认克隆可能不会获取全部历史
解决方案:
git tfs clone http://tfs-server:8080/tfs/DefaultCollection $/Project/Main --deep
git tfs pull
以避免大规模合并冲突git tfs checkin
进行小批量提交而非大块提交.gitignore
和 .tfignore
文件git tfs clone http://tfs-server:8080/tfs/DefaultCollection $/Project/Main --changeset=12345
git tfs shelve my-shelveset
git tfs unshelve my-shelveset
git tfs tag v1.0 $/Project/Main -c=12345
通过合理使用 Git-TFS,团队可以享受 Git 的灵活性和强大功能,同时保持与 TFS 服务器的集成,实现平稳过渡或长期混合使用两种版本控制系统。
没有搜到相关的文章