MyBlogs
BlogTags
Published on
Wednesday, August 23, 2023

Git Reset a File to HEAD

git restore pathTo/MyFile

The above will restore MyFile on HEAD (the last commit) on the current branch.

Reference

  • https://stackoverflow.com/questions/7147270/hard-reset-of-a-single-file

Tags

Git

In "Git" tag

Previous in tag

Git Auto Switch Email

Next in tag

Fast forward merge

Previous Article

道德经主要思想

Next Article

道德经第一章
← Back to the blog
wiki.neo
•
© 2025
•
My Blogs