


Your Git updates these when you run git fetch, where your Git talks to their Git and gets all of its branches. (Remember that your origin/* remote-tracking branches are just recording, for you, what your Git saw that their Git has for its branches. Your Git has just finished talking to another Git on origin, giving them (the users of origin) updates for their master, and origin has accepted those updates, and your Git is now recording the fact that, the last time it talked with origin, their master was set to some particular commit hash-the one you just pushed. In any case it's likely that your git push has actually succeeded at this point, since what is failing is the update to your origin/master remote-tracking branch. git/refs/remotes/origin # create empty origin/

git/refs/remotes/origin # remove all origin/* Note that I don't recommend it in general-your Git service, whether that's Android Studio or ordinary command-line Git, is not supposed to crash and leave you with a broken repository, so you should never have to do this, it's just an emergency repair, something like putting duct tape all over your car 1 after a tree fell on it, just enough to get you to a proper repair / replacement vehicle later: $ cd $(git rev-parse -show-toplevel) # if necessary To fix it, you can probably use the sequence of commands below. (It's not clear to me what exactly went wrong, but your guess that it happened when Android Studio crashed seems likely to me as well.) Your refs/remotes/origin directory-this is a directory within in your local repository-has some sort of problem.
