【发布时间】:2020-11-13 22:46:17
【问题描述】:
我正在对 Microsoft Access VBA 代码进行版本控制,通常不区分大小写。然而,变量名的大小写在那时时不时发生变化(由 Access 编译器或开发人员)。这通常会导致我的 git 工作区发生巨大的变化。
如何还原或忽略仅涉及文件内容的大写或小写的更改?
一个例子:
git init
echo "public sub example()\nend sub" > mdlExample.ACM
# ^-- lower e
git add --all
git commit --all --message "Initial Commit"
echo "public sub Example()\nend sub" > mdlExample.ACM
# ^-- upper E
我会喜欢这样的:
git restore --only-case-changes # not working
然后:
git status
> On branch master
> nothing to commit, working tree clean
【问题讨论】:
-
@Jay 大多数用户只关心文件名。就我而言,文件内容是相关的。
-
啊,我的错。感谢您的快速回复。
标签: bash git git-bash case-insensitive