Paper / dev / git
clean repo
// cd to folder
// run commands in terminal
git fetch --depth=1
git reflog expire --expire-unreachable=now --all
git gc --aggressive --prune=all
basics
// remove .ds_store files
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
git stash
git stash list
git stash apply
git stash drop
git reset --hard
git difftool
// revert a modified (single) file back to previous commit
git checkout -- file
// example
git checkout -- sidebar.php
git checkout
git checkout 088ecd favicon.ico
// delete git
rm -rf .git
// set new origin [use the second one for https url]
git remote set-url origin git://new.url.here
git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git
// change git origin url
https://help.github.com/articles/changing-a-remote-s-url/
// recover deleted file
git log --diff-filter=D --summary | grep delete
git log -- [deleted-filename]
git checkout $commit~1 filename
gitignore
# custom
_src/
_core/
_adtl/
# end custom
.DS_Store
.AppleDouble
.LSOverride
# icon must end with two \r
Icon
# thumbnails
._*
# files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# wordpress
*.log
.htaccess
sitemap.xml
sitemap.xml.gz
wp-config.php
wp-content/advanced-cache.php
wp-content/backup-db/
wp-content/backups/
wp-content/blogs.dir/
wp-content/cache/
wp-content/upgrade/
wp-content/uploads/
wp-content/wp-cache-config.php