Created
September 12, 2011 08:18
-
-
Save ondrejmirtes/1210819 to your computer and use it in GitHub Desktop.
Git configuration
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
export PS1="\u:\W $ " | |
#GIT bash by HABR (modified by Dundee) | |
export PSORIG="$PS1" | |
function GITBRANCH() { | |
BRANCH="$(git branch 2>/dev/null | grep '*' | cut -d" " -f2-)" | |
if [ -n "$BRANCH" ] ; then | |
export PS1="\u:\W " | |
export PS1=$PS1$(echo -en "\[\033[00;37m\]$BRANCH \[\033[00m\]") | |
export PS1=$PS1'$ ' | |
else | |
export PS1="$PSORIG" | |
fi | |
} | |
PROMPT_COMMAND="GITBRANCH" |
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
[user] | |
name = Ondrej Mirtes | |
email = ondrej@mirtes.cz | |
[core] | |
autocrlf = input | |
safecrlf = true | |
excludesfile = ~/.gitignore_global | |
[color] | |
ui = auto | |
interactive = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow | |
frag = magenta | |
old = red | |
new = green | |
[color "status"] | |
added = green | |
changed = yellow | |
untracked = cyan | |
[alias] | |
fetch = fetch -p | |
f = fetch -p | |
m = merge | |
mom = merge origin/master | |
p = push | |
pf = push --force | |
st = status -s | |
sts = status | |
cm = commit | |
cma = commit --amend | |
unstage = reset HEAD | |
br = branch | |
co = checkout | |
rh = reset --hard | |
stash = stash --keep-index | |
su = submodule update --recursive | |
df = diff | |
dfc = diff --cached | |
l = log --graph --decorate --pretty=oneline --abbrev-commit | |
ll = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
ld = log -p | |
ls = log --stat | |
test = push -f origin HEAD:test | |
selenium = push -f origin HEAD:selenium | |
stats = shortlog -n -s --no-merges | |
rmb = !sh -c 'git push origin :$1' - | |
rb = rebase | |
rbi = rebase -i | |
rbc = rebase --continue | |
rba = rebase --abort | |
rbom = rebase origin/master | |
rbiom = rebase -i origin/master | |
cp = cherry-pick | |
optimize = !git prune && git gc --aggressive && git repack -a && git prune-packed | |
[remote "origin"] | |
push = HEAD |
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
lockfile | |
*.log | |
###################### | |
# OS generated files # | |
###################### | |
.DS_Store | |
ehthumbs.db | |
Icon? | |
Thumbs.db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment