I was able to resolve the issue myself - it turns out that the git http buffer was too small for the repository for some reason. I fixed it by going into the git repository in terminal and doing:
git config http.postBuffer 524288000
followed by:
git push -u origin master
Posting this in case anyone else encounters a similar issue!