I want to revert back to a specific commit ID. Restore a file I “git rm”-ed. Blow away all commits made since then. And then commit that repo. How would I do this?
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.
Note that anyone who has cloned your repo may experience minor problems if they simply pull in your changes (since you forced the branch backwards in the commit history); they should do this to get your changes:
Note that this will also blow away any of their changes in the current branch. However, if they have any branches made from their current branch, those branches will still have the commits you “blew away”.