Git Going back
Going back
Revert the changes in uncommited but stagged changes
git reset --hard
Revert the changes in individual files
git checkout file
Simply unstag a file
git reset file.ext
Remove completely from history
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch FILENAME" HEAD
and then
rm -rf .git/refs ...