Restore deleted files in a Git commit
Have you accidentally deleted a file? Or maybe you need to restore a file that was deleted? Here's how Git can help you.
The Git snippet collection contains a variety of short tips and tricks for all currently maintained versions of git. It includes most commonly-used commands and covers various use-cases in the form of simplified documentation, complete with multiple examples.
Have you accidentally deleted a file? Or maybe you need to restore a file that was deleted? Here's how Git can help you.
If you need to copy a file from another branch to the current branch, here's an easy way to do it.
Made some changes you don't want to keep? Learn how to discard uncommitted or untracked changes in Git.
Want to compare the changes between two branches in Git? Here's how you can do it.
Get the name of the current branch in Git.
Learn how to create a new Git branch and optionally set up a remote tracking branch.
View differences between staged or unstaged changes and the last commit in Git.
Learn how to easily switch between branches in Git.