git挂钩用于“ git add”或其他替代品以前运行的替代方案比预先提交的其他替代方案?
我想在git add add
运行之前始终尝试执行拉动
,以便在没有冲突之前可以在进行本地提交之前同步任何远程更改。
除了使用别名命令之外,还有什么方法可以这样做?我可以使用钩子吗?
这样做的基本原理是避免烦人的提交,而这种烦恼仅与两个不同的分支合并。
I'd like to always try to perform a pull
before git add
runs so that any remote changes can be synced before the local commit is made, assuming no conflicts.
Is there any way to do this besides to use an aliased command? Is there a hook I could use?
The rationale for this is to avoid annoying commits that only exist to merge two divergent branches.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论