Git error when pushing - update_ref failed
<p>I have a problem when i try to push my local commits, it has probably happened when Android Studio has crushed. Here is the error:</p>

<blockquote>
  <p>update_ref failed for ref 'refs/remotes/origin/master': cannot lock
  ref 'refs/remotes/origin/master': unable to resolve reference
  refs/remotes/origin/master: Invalid argument</p>
</blockquote>

<p><code>$git stash</code> says that <code>HEAD</code> is now at my latest commit.</p>

<p>I'm still a beginner in git and I have no idea how to fix it.. What can I do?</p>