gpt4 book ai didi

git update-index --no-assume-unchanged 不起作用

转载 作者:太空狗 更新时间:2023-10-29 13:18:15 24 4
gpt4 key购买 nike

我在几个文件上设置了 assume-unchanged 位,现在我想取消设置它们,但这不起作用。

> git update-index --no-assume-unchanged Gemfile
> git ls-files -v | grep Gemfile
S Gemfile
S Gemfile.lock
> git status
# On branch foo
nothing to commit (working directory clean)
>

我的 Gemfile 当然有变化。有些我不想犯,有些我想犯。如果其他人更改 Gemfile,我将无法 merge 。它似乎真的把太多东西搞砸了。

所以我有两个问题:

1:如何取消设置位?2:有没有更好的方法来忽略一个特定的本地更改,同时允许对该文件的其他更改正常工作?

最佳答案

也许有点晚了,但我遇到了和你一样的问题,我通过使用 --really-refresh 标志解决了它

像这样:

git update-index  --really-refresh --no-assume-unchanged Gemfile

希望这对你有用

后期编辑:

如果你有多个文件,显然可以分两步完成

 git update-index  --really-refresh
git update-index --no-assume-unchanged Gemfile

关于git update-index --no-assume-unchanged 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11755922/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com