perforce 中是否有相当于 git stash 的东西?
我已经尽我所能地挖掘了互联网,但由于缺乏我,我无法找到任何轻松地在本地强制存储或分支的方法。 我知道 perforce 的 git 包装器,但从我读到的有关它的所有内容来看,它确实看起来不太成熟或不太可靠。
I've dug through the interwebs all I can, and I can't for the lack of me find any way of easily stashing or branching locally with perforce.
I know of the git wrapper for perforce, but it really doesn't seem too well developed or reliable from everything I've read about it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Perforce 2009.2 具有搁置和取消搁置功能,允许您将修改放在服务器上,而无需将其签入。
http://blog.perforce.com/blog/?p=1872
我认为它提供了您想要的功能?
如果您尚未使用 2009.2,还有 P4_Shelve 和 p4tar 作为可能的替代方案。
Perforce 2009.2 has shelve and unshelve, that let you put modifications on the server, without checking them in.
http://blog.perforce.com/blog/?p=1872
I think that provides the sort of functionality you want?
If you aren't yet using 2009.2, there are also P4_Shelve and p4tar as possible alternatives.
关于分支,我怀疑你可以在 Perforce 中本地“分支”,也不能在本地存储。
关于分支:
p4分支
”命令创建的实体中 - 也是一个名词) - 这些将在下面讨论p4integrate
”命令创建一个或多个文件的新代码线(或分支!)当用作动词(“分支”)时, ="http://www.vaccaperna.co.uk/scm/branching.html" rel="nofollow noreferrer">perforce 分支简介,Perforce 与其中央 depo 紧密相连,需要创建用于创建分支的每个文件的相关元数据。
Git 只会写入一些位来注册新分支的创建!
[*] git 分支存储在
.git/refs/heads/
子目录中Regarding branching, I doubt you can "branch" locally in Perforce, nor could you natively stash.
Regarding branching:
p4 branch
" command - also a noun) - these are talked about belowp4 integrate
" command to create a new codeline (or branch!) of one or more filesAs mentioned in this introduction to perforce branching, Perforce, being heavily linked to its central depo, need to create the relevant metadata for each files to create a branch.
Git would only write some bits to register the creation of a new branch!
[*] git branches are stored in the
.git/refs/heads/
subdirectoryPerforce 的未来版本将拥有私有本地分支。 P4Sandbox 将允许您拥有一个本地的、断开连接的仓库子集。您可以从中央服务器拉取,在沙箱中做任何您想做的事情(包括分支和集成),然后,如果您愿意,可以推回到中央服务器。
正如 Douglas Leeder 的回答中所解释的,搁置是与 git stash 最接近的等效项。
(虽然最初看起来 P4Sandbox 将在 2011.1 版本中首次亮相,但 2011.1 测试版没有该功能,我在该版本的文档中也找不到任何提及它的信息。 perforce.com/blog/?p=6000#comment-4261" rel="nofollow">截至 2011 年 8 月,P4Sandbox 测试版定于“今年秋季”推出。)
A future version of Perforce will have private local branching. P4Sandbox will allow you to have a local, disconnected subset of the depot. You can pull from the central server, do whatever you want in your sandbox (including branching and integrating) and then, if you wish, push back to the central server.
Shelving is the closest equivalent of git stash, as explained in Douglas Leeder's answer.
(Although it initially appeared that P4Sandbox would make its debut in version 2011.1, the 2011.1 beta does not have the feature, nor can I find any mention of it in the documentation for that version. As of August 2011, the P4Sandbox beta was slated for "this fall".)