请,
我收到错误“您对以下文件的本地更改将被签出覆盖”,但我的工作树是干净的。
有人知道这里发生了什么吗?
$ git status
On branch experiment
nothing to commit, working tree clean
$ git checkout develop
error: Your local changes to the following files would be overwritten by checkout:
app/build.gradle
Please commit your changes or stash them before you switch branches.
Aborting
(文件app/build.gradle
不在我的.gitignore
file)
这是顶级 .gitignore 文件:
### Android ###
# Built application files
*.apk
*.ap_
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# Intellij
.idea
*.iml
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Mac
.DS_Store
### Android Patch ###
gen-external-apklibs
这是 /app 目录中的 .gitignore 文件(我不知道为什么它在那里):
build
# Secrets
secrets.properties
狂野的射击:
我曾经读到过一个隐藏的“假设不变的标志”(参见例如这个答案 https://stackoverflow.com/a/30402432/86072),
我知道查看该标志在文件上是否处于活动状态的唯一方法是(请参阅这个答案 https://stackoverflow.com/questions/2363197/can-i-get-a-list-of-files-marked-assume-unchanged) :
git ls-files -v | grep '^[[:lower:]]'
当您在存储库上运行上述命令时,您会看到什么?
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)