Skip to content

Instantly share code, notes, and snippets.

@httpdss
Created March 23, 2012 19:06
Show Gist options
  • Save httpdss/2173919 to your computer and use it in GitHub Desktop.
Save httpdss/2173919 to your computer and use it in GitHub Desktop.
bash snippets
function dl() {
curl -kO $1
}
function gitp () {
$NAME=`echo $2 | cut -d"/" -f2`
git co $1 && git co -b $NAME && git merge --squash --no-commit $2
}
function gitd () {
for remote_branch in $(git br -a | grep remotes | grep -v HEAD| cut -d"/" -f3); do
echo "============== $1 with $remote_branch============="
git log --decorate --pretty=oneline --abbrev-commit ^$1 origin/$remote_branch
done
}
function gitdb () {
echo "============== $1 with $remote_branch============="
git log --decorate --pretty=oneline --abbrev-commit ^$1 origin/$2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment