当前位置: 动力学知识库 > 问答 > 编程问答 >

Using git with rtc -- how about rsync?

问题描述:

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:

  1. Doing a git init at the top of the my RTC sandbox, and making sure that git files are ingored in the .jazzignore.
  2. 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.

网友答案:

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".

分享给朋友:
您可能感兴趣的文章:
随机阅读: