将 git 与 rtc 结合使用——rsync 怎么样?
为了加快我跟踪自己的更改的能力,我想使用 git。我的团队正在使用 RTC(Rational Team Concert)。 perforce 与 git 有一个很好的集成: http://kb.perforce.com/article/ 1417/git-p4。我还找不到 git-RTC 的类似内容。请注意,有一篇文章介绍了如何将 RTC 与另一个 SCM(例如 git)集成:https://jazz。网/库/文章/194。但是,我正在寻找 p4-git 桥提供的详细工作流程说明类型,例如如何设置文件、如何保持文件同步、如何将 git 提交发送到 RTC。
我想知道是否还有其他人解决了这个问题。
我正在考虑:
- 在我的 RTC 沙箱顶部执行 git init,并确保 git 文件被纳入 .jazzignore 中。
- 也许有我的 RTC 工作区沙箱的 rsync 副本,以便我可以获取沙箱中的更改,将它们 rsync 到我的“git-area”,然后将补丁应用回 RTC 沙箱区域。这将使 git 和 RTC 区域分开。
无论哪种情况,我都会执行 git stash 来保存我自己的更改,以便同步更改存储在它们自己的提交中。
如果我执行#1,我猜我的更改将准备好提交到 RTC,可能使用 GUI 或命令行。
在#2的情况下,如果我已经完成了中间提交,也许我可以使用 git rebase 对提交重新排序,这样我的提交就按顺序位于最后,然后创建一个补丁文件以应用于主 RTC 沙箱。
另一个想法是尝试重写p4脚本来支持RTC。我对 RTC 命令行界面还不够了解,无法对此进行评估。
To speed up my ability to keep track of my own changes, I'd like to use git. My team is using RTC (Rational Team Concert). There is a nice perforce integration with git: http://kb.perforce.com/article/1417/git-p4. I could not find anything like this yet for git-RTC. Note, there is an article on how you might integrate RTC with another SCM such as git: https://jazz.net/library/article/194. However, I'm looking for the type of detailed workflow instructions provided by the p4-git bridge, such as how you set up your files, how to keep files in sync, how to send git commits to RTC.
I'd like to know if anybody else has solved this problem.
I'm considering either:
- Doing a git init at the top of the my RTC sandbox, and making sure that git files are ingored in the .jazzignore.
- Maybe having a rsync'd copy of my RTC workspace sandbox, so that I can pick up changes in the sandbox, rsync them to my "git-area", and then apply patches back to the RTC sandbox area. This would keep the git and RTC areas separate.
In either case, I'd do a git stash to save my own changes, so that the sync'ing changes are stored in their own commits.
If I do #1, I'm guessing my changes will simply be ready to commit to RTC, maybe using the GUI or command line.
In the case of #2, if I have done intermediate commits, maybe I can use git rebase to reorder the commits so mine are sequentially at the end, and then create a patch file to apply to the main RTC sandbox.
Another thought is to try to rewrite the p4 scripts to support RTC. I don't yet know enough yet about the RTC command line interface to assess this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的方法仍然是 1/“RTC 沙箱(本地工作区)内的 git”
将 .git 目录添加到您的
.jazzignore
中,您就可以开始工作了。RTC 的待处理更改将获取 git 工作树中发生的任何更改。
但是,如果您希望将 git 工作树与 RTC 沙箱分开,您可以考虑使用
GIT-WORK-TREE
以便 git 工作树能够根据 RTC 沙箱中的任何更改进行自我更新.请参阅“运行“git status “针对位于系统其他位置的存储库”。
The simplest way remains 1/ "git within the RTC sandbox (local workspace)"
Add the .git directory to your
.jazzignore
and you can start working.The pending changes of your RTC will pick up whatever has changed in your git working tree.
However, should you want to keep your git working tree separate from your RTC sandbox, you can consider using
GIT-WORK-TREE
in order for your git working tree to update itself with any change from your RTC sandbox.See "Running “git status” against a repository located elsewhere in the system".