那么更好的办法是,使用git-p4或者将.git目录滑入工作目录并让perforce忽略它? [英] So which is better, using git-p4 or just sliding a .git directory into the working directory and having perforce ignore it?

查看:271
本文介绍了那么更好的办法是,使用git-p4或者将.git目录滑入工作目录并让perforce忽略它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这有 up 之前,但是在我看到的帖子中,没有什么日常的个人经历。只有几个回应。
我很想听听那些使用git-p4的人,或者在Perforce的repo中使用过在封面下的git,或者两者兼而有之。

对于那些只是使用git在另一个版本控制下,我很想听听你如何处理通知主要版本控制的变化。具体来说,使用git / perforce,当你完成并准备好将更改提交给perforce服务器时,你如何处理告诉perforce出现了哪些变化?

我已经研究过post-commit用git挂钩,但我很想听听其他想法。

解决方案

我在工作时使用了git-p4。这是一个双向桥,所以如果你想使用git,然后将你的本地提交回p4,这是一个不错的方法。然而,我们的办公室政策有一小部分大规模提交的文化,而不是许多小文件,因此我必须将所有更改重新拼接成单个补丁,然后再提交到p4。我本来希望保持细致的本地历史,但一次性投回,但永远不能管理。




Apropos更改通知。 git-p4 会为您自上次登录以来的每次登录创建补丁并将它们作为单独的更改集提交。这种类型的镜像反映了你在git仓库中工作的主要分支的历史。


I know this has come up before, but there was little in the way of day to day personal experiences in the posts I saw. Only a couple of responses. I'd love to hear from people that use git-p4, or have used git "under the covers" in a Perforce repo, or preferably both.
And for those people who just use git underneath another version control, I'd love to hear how you deal with notifying the main version control of changes. Specifically, with git/perforce, when you're done and ready to commit the changes to the perforce server, how do you deal with telling perforce what changes there's been?
I've looked into post-commit hooks with git, but I'd love to hear any other ideas.

解决方案

I used git-p4 at work. It's a bidirectional bridge so if you want to use git and then commit your local commits back into p4, it's a nice way to go. However, our office policy had a culture of a small number of massive commits rather than many small ones so I had to rebase all the changes into a single patch before submitting back into p4. I would have liked to maintain the fine grained local history but commit back in a single shot but never could manage.


Apropos change notification. git-p4 creates patches for every checkin since your last and submits them as separate changesets. This sort of mirrors the history of the main branch you're working on in your git repository.

这篇关于那么更好的办法是,使用git-p4或者将.git目录滑入工作目录并让perforce忽略它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆