Code + Data Snippets

Example data

A compressed tar archive: stat447_data.tar.gz

git alias

Here is the alias portion of my ~/.gitconfig mentioned in the git lectures:

        ui = true
        st = status
        ci = commit
        co = checkout
        ls = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
        ll = log --pretty=format:\"%C(yellow)%h%Cred%d %Creset%s%Cblue [%cn]\" --decorate --numstat
        hist = log --graph --decorate --pretty=oneline --abbrev-commit
        pu = pull --all --prune
        nb = checkout -b
        fp = fetch -p


Here is a portion of my ~/.bashrc mentioned in the git lectures to display git branches:

## Set the prompt to show the current git branch:
function parse_git_branch {
    ref=$(git symbolic-ref HEAD 2> /dev/null) || return
    echo "("${ref#refs/heads/}")"
## this works (once parse_git_branch above has been defined) and does not have user@host, just 'host:dir(branch): '
#export PS1='\[\e[38;5;202m\]\[\e[38;5;245m\]\[\e[00m\]\[\e[38;5;172m\]\h\[\e[00m\]:\[\e[38;5;202m\]\w\[\e[38;5;245m\]$(parse_git_branch)\[\e[00m\]$ '
## this one has user@host:working/dir(branch):
export PS1='\[\e[38;5;202m\]\u\[\e[38;5;245m\]@\[\e[00m\]\[\e[38;5;172m\]\h\[\e[00m\]:\[\e[38;5;202m\]\w\[\e[38;5;245m\]$(parse_git_branch)\[\e[00m\]$ '