Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Error committing and pushing files to github

+11 votes
I am getting the following error message when I commit and push the files from AndroidStudio to Github:

Some files contain problems.
5 errors and 53 warnings found.
Would you like to review them?

I cannot see any error in my files.
asked Apr 7, 2015 in Spring 2015 by Abdul Rahman Merhi (100 points)

1 Answer

+5 votes
Android Studio will warn you if you are pushing changes when your code has either warnings or errors.  (It won't actually stop you, if you insist that you want to push anyway.)

In general, the warnings probably aren't a big deal, but if your code has compiler errors, you'll really want to think twice about pushing that code, since if your teammates pull, then they'll have code that doesn't compile and they can't build/run/test it.  (And this will probably make them grumpy with you.)

In general, it's better to commit your code every time you reach a working state.

It's also best to reach a working state frequently!  That is, get a simple working version of the code going, and then add one feature at a time, testing each feature as you go.
answered Apr 8, 2015 by Forrest Stonedahl (100 points)