I just ran
git pull --rebase
and forget to specify “origin”. It looks like git pulled from all different branches. Is there a way to revert my repo from here to undo the pull?
Thanks
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.
After a
git pulloperation,ORIG_HEADshould point to the previous value ofHEAD. You should be able to:And be back where you started before the
pulloperation. You can run:To see exactly where
ORIG_HEADis pointing prior to running theresetcommand.An alternative solution would be to create a new branch based on
ORIG_HEAD:Verify that things look the way you expect, then delete the old branch and rename
new branch.Also see this question for a discussion of
HEADandORIG_HEADand alternate syntaxes for referring to the same thing.