Introduction
Diagnosing the Issue
Cause of the Issue
Solution
Step 1. Checking the Commit Log
Step 2. Reset the Commit to the Last Pushed Commi...
For further actions, you may consider blocking this person and/or reporting abuse
I had a similar issue, although the changes I was pushing were very small. I reset back to a known good commit and tried to push it to remote, but it wouldn't let me because there were remote changes I needed to pull first. After pulling those changes (which wasn't a problem), I was able to push up my local changes.
Thanks - this cleared the stuck push to GitHub on my MacBook M1. I don't think git should hang in this way with modest file sizes, but I see unresolved reports of this problem on Apple silicon. Were you using an M1 Mac?
It sucks that it hangs like it does without any kind of error or warning in the logs.
In terms of the machine I was / am on, it's an Intel-based Macbook Pro. I have had this issue on multiple platforms before so it's not an Apple Silicon specific issue.
That's awkward. I'm building a personal website using Hugo deployed via GitHub to a free Vercel account. So far it's gone well, but I planned to include a photo gallery. If I can't push photos to GitHub reliably, then that part of the project is a non-starter.
Yeah M2 here
Thank for sharing. I had a similar experience with my django app and the problem was that I was trying to save my ".venv" folder into github. Once I added my ".venv" to my gitignore file, then I was successful for posting my changes to github.
Thanks again.
You don't need to use git log and copy the hash to remove last commit. You can use:
This will do the same.
You saved my life! 🙏
Faced the same problem using MacBook Air M1 macOS Venture v13.1 when trying to push img created with R Studio.
Thank you for this detailed explanation on how to fix the problem.
👍👍
I'm glad it was useful and solved your problem. It is always images that cause this problem everytime!!
My solution that I came up with was to do
git push --all origin
Thanks for such detailed problem solving approach. It has helped me solve a two-weeks old problem.
Thank you