作曲家丢弃更改:[y,n,v,d,s,?]做什么做什么、作曲家

2023-09-07 09:02:13 作者:17.你并不懂我,

困扰我好几个月的简单问题.

Simple question that's been bugging me for months.

有时我会深入到供应商目录来修复错误(尤其是对于我们的内部库).在将修复程序迁移并部署回源包后,我将在主项目中 composer update company/package 并被问到:

Occasionally I'll dive into the vendors directory to fix a bug (especially for our internal libs). After migrating and deploying the fix back to the source package, I'll composer update company/package in the main project and am asked:

Discard changes [y,n,v,d,s,?]

我对 yn 有相当的了解,但找不到关于 vd 的文档, s, ? 做什么?我总是点击 y 但也许我错过了一些有用的东西.

I have a decent grasp on y and n but haven't been able to find documentation about what v, d, s, ? do? I always hit y but maybe I'm missing out on something useful.

添加了 d 选项(17 年 10 月) added d option (oct '17)

推荐答案

选择 ? 显示详情:

y - discard changes and apply the update
n - abort the update and let you manually clean things up
v - view modified files
d - view local modifications (diff)
s - stash changes and try to reapply them after the update

也可以查看源码,相关部分为这里.

You can also check the source code, the relevant part is here.