This page is no longer maintained — Please continue to the home page at www.scala-lang.org

my git configuration

2 replies
extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.

Since the era of scala-on-git is upon us...

Gaining facility with git, if you don't already have it, is the
highest millibang-per-monetary-unit pursuit of knowledge available to
you as a programmer. (OK, I have no idea whether this is true, but it
was true for me, and remains true since I'm still not that good.) I
offer an abbreviated version of my ~/.gitconfig to save you the
trouble of figuring out everything yourself.

https://gist.github.com/1412145

The colors are a work in progress; I also inserted commented out
versions of many things I haven't configured yet to make it easy to
configure them later.

It's an abbreviated version because I have some great original stuff
which requires a little more explanation as well as external programs,
and I need to properly package it.

extempore
Joined: 2008-12-17,
User offline. Last seen 35 weeks 3 days ago.
Re: my git configuration

Oh, I also have a lot of git-related bash aliases. Most of these
could as easily be in ~/.gitconfig as aliases. I get particularly
high mileage out of "gam", "grim", "gupd", "gdsh", and "gdsm".

(The "confusing DSL" is in most cases the first letters of the words
in the full command, if that's not abundantly obvious.)

alias g='git'
alias gam='git commit -a -m'
alias gba='git branch -a'
alias gbag='git branch -a |grep'
alias gdh='git diff head^ head'
alias gdhm='git diff head^ | mate'
alias gdm...='git diff master... -- src'
alias gdm='git diff master'
alias gdmm='git diff master | mate'
alias gdsh='git diff --stat=100,100 head^'
alias gdsm...='git diff --stat master... -- src'
alias gdsm='git diff --stat=100,100 master'
alias gfrr='git fetch . refs/remotes/*:refs/heads/*'
alias git-svn-sha-pairs="git svn log --oneline --show-commit | cut -d
'|' -f 1,2"
alias gitpatches='git format-patch --full-index --binary'
alias glm...='git log --no-merges master..'
alias glnm='git lol --branches --not master'
alias gm='git co master'
alias gmm='git merge master'
alias gra='git rebase --abort'
alias grh='git reset --hard'
alias grhchop='git reset --hard ; git chop'
alias grhh='git reset --hard head^'
alias grim='git rebase -i master'
alias grm='git rebase master'
alias gsr='git svn rebase'
alias gupd='git commit -a --amend -C head'
alias gvps='git verify-pack -v .git/objects/pack/pack-*.idx | sort -k3n'

adriaanm
Joined: 2010-02-08,
User offline. Last seen 31 weeks 4 days ago.
Re: my git configuration
thanks!
I didn't know about rerere (http://progit.org/2010/03/08/rerere.html)
I prefer
[push]   default = tracking
other than that, as of now, mi gitconfig e tu gitconfig
I'd also recommend installing the bash completion script for git, and particularly, enabling the prompt customization see https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion
short version: copy/paste the paragraph below in a terminal (but don't sue me if it reformats your hard drive or something)
mkdir ~/bin; cd ~/bin; curl -O https://raw.github.com/git/git/master/contrib/completion/git-completion.bash cat << "EOF" >> ~/.profilesource ~/bin/git-completion.bashexport PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' EOF

adriaan

On Thu, Dec 1, 2011 at 1:19 AM, Paul Phillips <paulp [at] improving [dot] org> wrote:
Since the era of scala-on-git is upon us...

Gaining facility with git, if you don't already have it, is the
highest millibang-per-monetary-unit pursuit of knowledge available to
you as a programmer.  (OK, I have no idea whether this is true, but it
was true for me, and remains true since I'm still not that good.) I
offer an abbreviated version of my ~/.gitconfig to save you the
trouble of figuring out everything yourself.

 https://gist.github.com/1412145

The colors are a work in progress; I also inserted commented out
versions of many things I haven't configured yet to make it easy to
configure them later.

It's an abbreviated version because I have some great original stuff
which requires a little more explanation as well as external programs,
and I need to properly package it.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland