Skip to content

Instantly share code, notes, and snippets.

@havvg
Last active November 4, 2019 12:03
Show Gist options
  • Save havvg/1b04af7b471147879275 to your computer and use it in GitHub Desktop.
Save havvg/1b04af7b471147879275 to your computer and use it in GitHub Desktop.
[core]
editor = mate -w -l 1
excludesfile = ~/.gitignore
whitespace = trailing-space,space-before-tab,-indent-with-non-tab,tab-in-indent,tabwidth=2
autocrlf = input
ignorecase = true
[diff]
patience = true
algorithm = patience
[notes]
displayRef = refs/notes/*
[advice]
detachedHead = false
[pull]
rebase = preserve
[push]
default = upstream
[merge]
summary = true
log = false
[rerere]
enabled = true
[rebase]
autostash = true
[stash]
showPatch = true
[branch]
autosetuprebase = always
#[remote "origin"]
# fetch = +refs/pull/*/head:refs/gh-pull/remotes/origin/*
#[remote "upstream"]
# fetch = +refs/pull/*/head:refs/gh-pull/remotes/upstream/*
[color]
ui = always
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
func = cyan bold
frag = magenta
old = red
new = green
whitespace = red reverse
[color "status"]
added = green
changed = yellow
untracked = cyan
nobranch = red
[pretty]
changelog = format:* %h %s
public-changelog = format:* %s
pretty-history = format:%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset
[gitflow]
multi-hotfix = true
[gitflow "feature.finish"]
rebase = true
no-ff = true
[gitflow "prefix"]
feature = feature/
release = release/
hotfix = hotfix/
support = support/
versiontag = v
[alias]
st = status
update = add -u
amend = commit --amend
ci = commit
ci-rm = !git commit && git notes --ref=redmine add
ci-gh = !git commit && git notes --ref=github.issues add
ci-n = !git commit && git notes add
co = checkout
di = diff
staged = diff --cached
ls-staged = diff-index --cached --name-only HEAD
di-staged = !git diff-index --cached --name-only --diff-filter=ACMR HEAD | xargs git di
co-staged = !git diff-index --cached --name-only --diff-filter=ACMR HEAD | xargs git co
up-staged = "!f() { git ls-staged; }; git add -p `f`"
coding-standards = "!php-cs-fixer fix --level=symfony --fixers=ordered_use"
cs = "!f() { git diff-tree --no-commit-id --name-only --diff-filter=ACMR -r \"$1\" | xargs -n1 git coding-standards; }; f"
cs-staged = "!git diff-index --cached --name-only --diff-filter=ACMR HEAD | xargs -n1 git coding-standards"
cs-head = "!git diff-tree --no-commit-id --name-only --diff-filter=ACMR -r HEAD | xargs -n1 git coding-standards"
cs-tree = "!f() { git ls-tree -r --name-only HEAD \"$1\" | xargs -n1 git coding-standards; }; f"
ph = log --graph --pretty=pretty-history --abbrev-commit --date=relative
cl = log --pretty=changelog --cherry --abbrev-commit --date-order
sl = log --oneline --reverse --no-merges --stat
review = "!f() { git ph --author=\"$1\" ; }; f"
rv = remote -v
fa = fetch --all -v
ff = pull --ff-only
wu = branch -a --no-merged
upstream = !git merge --ff-only upstream/`git branch --list --no-color | grep -e '^\\*' | cut -d\" \" -f2`
cctrl = push --recurse-submodules=check cloudcontrol
pt = push --tags origin master:master develop:develop
rf = "!f() { git flow feature track \"$1\"; git co feature/\"$1\"; git ff; git rebase develop; git flow feature finish \"$1\"; }; f"
[git-up "fetch"]
prune = true
all = true
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment