If you are using a “professional” IDE chances are good that you can restore files from a local History.
In Rubymine for example you can right click files and watch a history of changes independent from the git changes, saved me a few times now ^^
More Related Contents:
- Error when pushing amended commit to remote [duplicate]
- Can git automatically switch between spaces and tabs?
- How to do a GitHub pull request
- How to cherry-pick multiple commits
- Removing multiple files from a Git repo that have already been deleted from disk
- fetch in git doesn’t get all branches
- Git pre-commit hook : changed/added files
- How to recover from a git push -force?
- How do I remove version tracking from a project cloned from git?
- How do I add an empty directory to a Git repository?
- Git and the Umlaut problem on Mac OS X
- Git: What’s the best practice to “git clone” into an existing folder?
- How to revert initial git commit?
- Is there a way to lock individual files or directories on fork when using git?
- Git checkout in post-receive hook: “Not a git repository ‘.'”
- ‘Go Get’ Private Repo from Bitbucket
- Git: merging public and private branches while while keeping certain files intact in both branches
- Does git ignore empty folders?
- How to change commit author for multiple commits using filter branch?
- main branch and ‘origin/main’ have diverged, how to ‘undiverge’ branches’?
- How to list all tags pointing to a specific commit in git
- git clone, ignoring a directory
- What are the U and M file markers in Visual Studio Code?
- How can I rewrite history so that all files, except the ones I already moved, are in a subdirectory?
- How to merge the remote branch and ignore the config setting?
- How do I deal with corrupted Git object files?
- github: server certificate verification failed
- VS Code / Bitbucket / SSH – Permission denied (publickey)
- SourceTree App says uncommitted changes even for newly-cloned repository – what could be wrong?
- How do I write a batch file which opens the GitBash shell and runs a command in the shell?