If the repository or file you're working with is large, try increasing Git's buffer size:
git config --global http.postBuffer 524288000