Another thing you can look at is through your IDE. I accidentally checkout 2 files and was able to bring back the changes through the ‘local history’ of my IDE (Netbeans). What a blessing!
If you’re using Eclipse, do this by right clicking on the file and going to Team->Show Local History.
More Related Contents:
- How do I check out a remote Git branch?
- How do I revert a Git repository to a previous commit?
- How can I reset or revert a file to a specific revision?
- How to find and restore a deleted file in a Git repository
- How do I revert all local changes in Git managed project to previous state?
- How can I move HEAD back to a previous location? (Detached head) & Undo commits
- Merge, update, and pull Git branches without using checkouts
- How can I get the latest tag name in current branch in Git?
- What’s the difference between “git reset” and “git checkout”?
- Retrieve a single file from a repository
- Rollback to an old Git commit in a public repo
- Difference between git checkout –track origin/branch and git checkout -b branch origin/branch
- How to checkout in Git by date?
- What’s the difference between Git Revert, Checkout and Reset?
- What is git tag, How to create tags & How to checkout git remote tag(s)
- How do I reset or revert a file to a specific revision?
- How do I find and restore a deleted file in a Git repository?
- Why does Git tell me “Not currently on any branch” after I run “git checkout origin/”?
- Git checkout: updating paths is incompatible with switching branches
- What to do with commit made in a detached head
- What is the difference between “git branch” and “git checkout -b”?
- Switch Git branch without files checkout
- error: Your local changes to the following files would be overwritten by checkout
- How do I reset or revert a file to a specific revision?
- Is there any way to git checkout previous branch?
- Switch branch and ignore any changes without committing
- Git push error: Unable to unlink old (Permission denied)
- Unstage a deleted file in git
- Restore file from old commit in git
- “Cannot update paths and switch to branch at the same time”