git revert (reset) a single file
Home
Articles
Java
Speaking
Raspberry Pi
Calculators
FIX Protocol
Published June 6th, 2012
How to you undo uncommitted changes to a single file and revert it back to the previous version in git?
To revert your working copy of a file back to the version last committed on HEAD
git checkout filename
To revert your entire working copy (ALL WORKING FILES)
git reset --hard
Similar Articles
git clone pass ssh key
Git check incoming changes
Avoiding Dante's 9th Circle of Hell (hint: git branch)
git stash
git delete branch
Git unstage changes (roll back a commit)
git rebase
git rebase - changes depends on abandoned changes
git fetch changes from remote repository and merge them with your local changes
Set up git repository on Debian and push changes from local repository
git reset instead of rebase
Git rename files under version control
git simple checkout, create new branch, add, commit
git list files not under version control
All content on this website is Copyright 2003 - 2024 Chris Newland
Privacy Policy