简体   繁体   English

我们可以在Eclipse EGit中禁用或阻止“提交并推动”吗?

[英]Can we Disable or Prevent “Commit-and-Push” in Eclipse EGit?

We migrated to Git a few months ago. 几个月前,我们迁移到了Git。 To ease the transition, we adopted using the EGit plugin for Eclipse. 为了简化过渡,我们采用了Eclipse的EGit插件。 The Git Staging view includes 2 buttons: "Commit" and "Commit and Push" Git Staging视图包括2个按钮:“提交”和“提交并推送” Eclipse中的Git Staging视图

We trained the team in a Commit-Pull-Push workflow. 我们在Commit-Pull-Push工作流程中对团队进行了培训。 But the "Commit and Push" button has become popular in practice. 但是“提交并按下”按钮在实践中已变得很流行。 It causes some minor workflow issues and I am discouraging its use, but would love to disable or remove the option until we have a deeper team-wide understanding of Git. 它会导致一些小的工作流程问题,因此我不鼓励使用它,但希望禁用或删除该选项,直到我们对Git有更深入的了解。

Is this possible? 这可能吗? Is there a setting, property or option to disable "Commit and Push"? 是否有设置,属性或选项可禁用“提交并推送”?

IMHO we can't make "Commit and Push" button disabled. 恕我直言,我们不能禁用“提交并按下”按钮。

EGIT doesn't provide any preference option to disable this. EGIT没有提供任何首选项来禁用此功能。 If you want to remove/disable this button your have to edit the source code of EGIT eclipse plug in then build it for yourself. 如果要删除/禁用此按钮,则必须编辑EGIT eclipse插件的源代码,然后自己构建。

Instead you try NOT to use GIT staging view for committing purpose but use commit dialog for committing. 相反,您尝试不使用GIT暂存视图进行提交,而使用提交对话框进行提交。 Disable the preference Use Staging View to commit instead of Commit Dialog in Windows > Preferences > Git > Committing 禁用首选项Use Staging View to commit instead of Commit Dialog Windows > Preferences > Git > Committing Use Staging View to commit instead of Commit DialogWindows > Preferences > Git > Committing

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

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