简体   繁体   English

什么是perforce中的git南瓜(p4)

[英]What is the equivalent of git squash in perforce (p4)

In git, I find the squash or fixup very useful while rebasing local commits. 在git中,我发现重新设置本地提交时, 壁球修复非常有用。 Consider the below scenario. 请考虑以下情形。

  • Commit "Feature", "Partial Bug Fix", "Complete Bug fix" are three separate local commits. 提交“功能”,“部分错误修复”,“完成错误修复”是三个单独的本地提交。
  • While doing git rebase --interactive , I squash those commits into one commit "Complete Feature" 虽然这样做git的变基--interactive,压扁这些提交到一个提交“完整功能”

I am looking for something similar in perforce (or p4v interface). 我在perforce(或p4v界面)中寻找相似的东西。 I am aware of shelving/unshelving. 我知道要搁置/搁置。 Any possible workarounds? 任何可能的解决方法?

Use p4 unsubmit to unsubmit the changes, then p4 resubmit -i to resubmit them in interactive mode (which I believe allows you to squash/etc). 使用p4 unsubmit来取消p4 resubmit -i更改,然后使用p4 resubmit -i以交互方式重新提交它们(我相信您可以挤压/ etc)。

Since unsubmit converts the submitted changes into normal shelved changes you can operate on them with other commands as well. 由于unsubmit提交会将提交的更改转换为常规的搁置更改,因此您也可以使用其他命令对其进行操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM