首页 > 解决方案 > How to suppress gradlew.bat changes in React Native

问题描述

Whenever I try to change branches or commits, it says my android/app/gradlew.bat has been modified. I have closed and even deleted Android Studio, all terminals, even killed akd and other Android related events in Activity Monitor but when I check the file changes, gradlew.bat keeps being updated and I can't figure out what is modifying it.

I'd like to avoid git ignoring it as we want to keep our Gradle versions synced on our team.

标签: react-nativegradlew

解决方案


我的队友刚刚给我发了这个 StackOverflow,它为我解决了这个问题:

git reset --hard 后留下的未分级更改

git rm .gitattributes
git add -A
git reset --hard

推荐阅读