Permissions Error When Pulling Changes for Drupal

It’s pretty annoying for a couple reasons. First, it doesn’t update the repo like it should because it gets stuck on that permission error. And second, even though the command fails, it leaves me with a bunch of modified files in my repo.