Created
February 24, 2014 17:04
-
-
Save MattReimer/9192351 to your computer and use it in GitHub Desktop.
Stupid Git tricks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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