Hacker News new | past | comments | ask | show | jobs | submit login

I'll be adding a lot of these; I especially like the "what was I doing..." ones. To continue with the sharing:

    up = !git pull --prune $@ && git submodule update --recursive
    cm = !git add -A && git commit
    save = !git add -A && git commit -m 'SAVEPOINT'
    undo = reset HEAD~1 --mixed
    amend = commit -a --amend
    # Removes branches deleted from remote repo
    bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f"
    # Leave current branch & do some cleanup
    bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"



I'll add a couple of my favorites, as well:

    glog = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
    stash-all = stash save --include-untracked
    update-fork = "!f() { git pull --rebase upstream $1 && git push origin $1; }; f"




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: