0

This file i never changed it but it always changed when run the app

The problem is when i want pull from git , i need to commit first. I just commit few file that i made change but still can't pull because it detect this generated build file is changed so i commit all file then when i pull then it will be a conflict. Need to rebuild but sometimes it take long time, sometimes need to invalidate and restart. But sometimes the project can't run again.. How can i prevent this problem ?

Piyush
  • 2,589
  • 6
  • 38
  • 77
MAS. John
  • 582
  • 6
  • 22
  • Please paste text errors which makes it easy for other devs to highlight parts - NOT images, which only make everyone else user more bandwidth – Nick Cardoso Mar 03 '17 at 04:40

2 Answers2

0

You need to read about how to use Git Ignore files - things listed in gitignore are not synced.

Intermediates and any other files in the build directory should not be added to version control.

This is a great starting point for what contents should be in your gitignore file:

*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild

I stole it vertabim from this answer, so you can find additional information there

Community
  • 1
  • 1
Nick Cardoso
  • 20,807
  • 14
  • 73
  • 124
0

Try to use git stash command before git pull. That command will save your local changes and clean working directory. You could always bring back saved changes (e.g., after git pull is finished) using git stash pop command. See git help stash for details

Anatolii Shuba
  • 4,614
  • 1
  • 16
  • 17