Newbie question: How do I undo local changes in a git repo back to the last push? I see lots of guidance for rolling back the last commit, or all local changes, but not this case specifically.
You find the commit to which you want to go back (let's say foo
) and then say git reset --hard foo
. The next push you do should be a force push if you want it to go through though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With