Skip to content

Instantly share code, notes, and snippets.

@MattReimer
Created February 24, 2014 17:04
Show Gist options
  • Save MattReimer/9192351 to your computer and use it in GitHub Desktop.
Save MattReimer/9192351 to your computer and use it in GitHub Desktop.
Stupid Git tricks
# Cleaning up a problematic submodule
# ======================================
# Remove submodule foo data from .git/config
# Remove the stale submodule's gitfile rm foo/.git
# Remove the stale submodule's repo rm -rf .git/modules/foo
# Clean now: git clean -xdf
# Fun Git aliases:
# ======================================
alias g="git $1"
alias gs="git status"
alias ga="git add $1"
alias gc="git commit -m $1"
alias gf="git fetch"
alias gbb="git branch --set-upstream $1 origin/$1"
alias cw="compass watch $1"
# Colourful terminal graph:
# ======================================
# put this in your bash_profile and smoke it:
function gg {
while true;
do
clear
git log --oneline --graph --decorate --all -20
sleep 10
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment