-
-
Save vlafiser/6049073 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# used by Git (commit messages, rebase, ...) | |
export EDITOR=vim | |
# GIT bash current branch | |
# 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=$PSORIG$(echo -en "\[\033[01;33m\]$BRANCH > \[\033[00m\]") | |
else | |
export PS1="$PSORIG" | |
fi | |
} | |
PROMPT_COMMAND="GITBRANCH" |
This file contains hidden or 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 = Vasek Purchart | |
email = [email protected] | |
[core] | |
# windows->true, linux-> input | |
autocrlf = input | |
safecrlf = false | |
# must be absolute path | |
excludesfile = /home/Vasek/.gitignore_global | |
[alias] | |
f = fetch | |
# updates your branch with upstream (if fast-forward is possible) | |
ff = !git merge --ff-only `git rev-parse --symbolic-full-name --abbrev-ref=strict HEAD@{u}` | |
fp = fetch --prune | |
st = status | |
cm = commit | |
cma = commit --amend | |
br = branch | |
co = checkout | |
cp = cherry-pick | |
df = diff | |
rb = rebase | |
rbi = rebase -i | |
rbc = rebase --continue | |
rh = reset --hard | |
su = submodule update | |
# graph for current branch | |
l = log --graph --decorate --pretty=oneline --abbrev-commit | |
# graph for all branches | |
ll = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
# log for current branch showing diffs (-m is for showing mergecommits too) | |
ld = log -p -m | |
# log for current branch showing summary of changed files (-m is for showing mergecommits too) | |
ls = log --stat -m | |
# number of commits for each person | |
stats = shortlog -n -s --no-merges | |
# remove remote branch (remote must be named origin), usage: git rmb test | |
rmb = !sh -c 'git push origin :$1' - | |
# shows local > tracked remote | |
brt = for-each-ref --format=\"%(refname:short) > %(upstream:short)\" refs/heads | |
# get upstream tracked branch or error | |
brtracked = rev-parse --symbolic-full-name --abbrev-ref=strict HEAD@{u} | |
# special branches | |
release = push origin HEAD:release | |
selenium = push origin HEAD:selenium | |
test = push origin HEAD:test | |
[remote "origin"] | |
# git push -> push current HEAD into tracked remote branch | |
push = HEAD | |
[diff] | |
mnemonicprefix = true | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
[color "status"] | |
added = green | |
changed = yellow | |
untracked = cyan | |
This file contains hidden or 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