I have recently made commits that I want to delete, and return the folder to the state it was before the commits.
Here is an image of commit history in a folder:
How can I delete the commits made after e1c0013
?
I have recently made commits that I want to delete, and return the folder to the state it was before the commits.
Here is an image of commit history in a folder:
How can I delete the commits made after e1c0013
?
Your screen capture indicates that 5 commits have been made on top of the e1c0013
commit. Assuming that you have not yet pushed this branch to your Git repo, you may use a hard reset:
# from desired branch
git reset --hard HEAD~5
If you have already pushed this branch to the remote, then you should instead revert the five commits:
# from branch "your_branch"
git revert your_branch~5..your_branch