✅ How to completely cancel a git push?

Disclaimer: I'm very new to Git (learning it since yesterday) Background: I have a private remote repo on Github. After I pushed my code there, I decided to also push some assets (small .ppm and .txt files). And here's main problem: in one of my asset folders I have a really big .ppm file (77 MB) about which I've completely forgot. I don't want it in my remote repo, because it's currently unused and sending it to Github can consume some of my precious internet bandwidth. Problem: I don't know, how to completely cancel this push. It stops after pressing CTRL+C or closing the terminal, but when I do git push again, it restarts. It's really slow and also consumes my RAM and CPU, which is really inconvenient.
No description
8 Replies
Pobiega
Pobiega8mo ago
so when you do git push, you tell git to push your local commits to the remote (github) as long as your local commit with the 77mb file exists, it will want to push that you need to modify the local commit that adds that 77mb file to no longer do so
SamwiseTheBrave
SamwiseTheBrave8mo ago
thanks, I think I got it
No description
Pobiega
Pobiega8mo ago
sounds about right
SamwiseTheBrave
SamwiseTheBrave8mo ago
thank you
Pobiega
Pobiega8mo ago
np. git has a learning treshhold for sure, but its sooooo good once you get used to it 🙂
SamwiseTheBrave
SamwiseTheBrave8mo ago
I'll /close it in a moment
Pobiega
Pobiega8mo ago
it does a lot more than just "move latest changes to github"
SamwiseTheBrave
SamwiseTheBrave8mo ago
thanks, it works now 😃
Want results from more Discord servers?
Add your server