bengreen.eu Circle Device

 

Quick Reference

Quick git Reference

Quick git Reference

Discard unstaged changes

git stash save --keep-index
git stash drop

StackOverflow Reference.

Set Nice Colours

I like colours and it makes things pretty! To set the colours in git to show when you type the various commands use the following commands.

git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto

Remove remote branches that are "gone"

git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done

Nice shell script from SO (remove local branches no longer on remote).

http://cheat.errtheblog.com/s/git/
http://kernel.org/pub/software/scm/git/docs/git-show-ref.html
http://kernel.org/pub/software/scm/git/docs/git-show.html
http://stackoverflow.com/questions/424071/list-all-the-files-for-a-commit-in-git
http://git.or.cz/course/svn.html

Quick Links: Techie Stuff | General | Personal | Quick Reference