How To Remove A File From The git Staging Pre-Commit List

Author: , May 31st, 2019

Quickref: How to Remove a file from the staging area

The Story Recently, I accidentally added some files to git’s pre-commit phase, i.e.:

For example, here is how to handle the above situation:

To better understand, here are the phases/states/stages that git uses: Untracked – when a file is first created, git […]

How To Revert a Single File to a Specific Commit Using git

Author: , March 18th, 2019

git log {path_and_file} git checkout {commit_hash} — {path_and_file} git checkout 8c7eae3f518bb7fd98eb6e8344270f02065d83ee — myFile.txt