gpt4 book ai didi

git 假设不变和 git stash

转载 作者:行者123 更新时间:2023-12-03 20:20:41 25 4
gpt4 key购买 nike

我将一些本地配置保存在假定未更改的文件中。随着时间的推移,我创建了几个分支,并且假定未更改的文件在两者之间演变(添加更多本地配置)。如果我尝试结帐较旧的分支,则会得到:

error: Your local changes to the following files would be overwritten by checkout:
<some assume-unchanged files>
Please, commit your changes or stash them before you can switch branches.

我不想提交它们并且不能 stash 它们(即使使用 --include-untracked 选项):
$ git stash
No local changes to save

有没有解决方案,或者有更好的工作流程让本地更改保持未提交?

最佳答案

目前,您需要使用适当的 .gitignore 文件或排除机制。假设不变意味着不同的东西。

关于git 假设不变和 git stash,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27012598/

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