Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gradlew.bat always changing after each commit in Android Studio

I've created my first Android Studio with Kotlin support, made a git project out of it, created a private github repository, added it to the remote in the project and did a first commit (not pushed yet).

However, as soon as I do a commit, there is always a new version of gradle.bat, which I shouldn't add to .gitignore.

Why, and how do I solve this?

like image 381
justHelloWorld Avatar asked Oct 06 '18 15:10

justHelloWorld


1 Answers

For those who are having the same issue, it seems the timestamp of this file is changed by IDEs and that's why Git sees it as changed all the time. My solution was to add it to my global .gitignore file and run git update-index --assume-unchanged src/file/to/ignore command as this file is already marked in Git as changed.

Be aware, it's a local solution, this helps only for your local development.

like image 81
Khrystyna Skvarok Avatar answered Sep 25 '22 00:09

Khrystyna Skvarok