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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You find the commit to which you want to go back (let’s say
foo) and then saygit reset --hard foo. The next push you do should be a force push if you want it to go through though.