git log # shows the hashes of all commits git reset --hard <hash of the commit to reset to>
add to .gitignore git rm --cached files/to/remove # starting from $GIT_DIR not /
find . -name .DS_Store -type f -exec git rm {} \;
add line
.DS_Store
to .gitignore and add the file to tracking if its not already
git add .gitignore git commit -m ".DS_Store banished!"
git config --global core.excludesfile = /Users/username/.gitignore
add line
.DS_Store
to the .gitignore-file from the first command