Настройки

This commit is contained in:
Andrei Astafev 2019-03-25 10:36:39 +03:00
parent 09d6a69ea5
commit 2c6a4e5d94

122
config
View File

@ -1,4 +1,124 @@
[user]
email = dev@246060.ru
name = Andrey Astafyev
email = dev@246060.ru
[core]
editor = vim
pager = less -R
whitespace=fix,trailing-space,cr-at-eol
autocrlf = input
safecrlf = true
[merge]
tool = meld
[alias]
# Base commands
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
st = status --short
cia = commit --allow-empty-message -a
# Stash commands
sl = stash list
sa = stash apply
ss = stash save
# Show all prfiles
ls = !git rev-parse --abbrev-ref HEAD | xargs git ls-tree -r --full-tree --full-name --name-only
# Push into current remote branch
pc = !git rev-parse --abbrev-ref HEAD | xargs git push origin
# Show untracked files
stu = status --untracked-files=no
# Show history
history = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
# Show git commands
commands = help -a
# Get object type
type = cat-file -t
# Get file info
info = cat-file -p
# Show commit logs
logs = !git shortlog --summary | sort --reverse --numeric-sort
# Show conflicts
conflicts = !git ls-files --unmerged | cut -f2 | sort -u | xargs grep -El '<<<<<<<|=======|>>>>>>>'
# Show unmerged files
unmerged = !git ls-files --unmerged | cut -f2 | sort -u
# Show aliases
aliases = !git config -l | grep alias | cut -c 7-
# Find files
find = !git ls-files -r HEAD | grep -ii
# Remove files which have been deleted
remove = !git ls-files -z --deleted | xargs -0 git rm
# Ignore a file
ignore = !([ ! -e .gitignore ] && touch .gitignore) | echo $1 >> .gitignore
# Assume a file as unchanged
assume = !git update-index --assume-unchanged
# Unassume a file
unassume = !git update-index --no-assume-unchanged
# Show assumed files
assumed = !git ls-files -v | grep ^h | cut -c 3-
# Pull from remote repository
fork = !git config --get remote.origin.url | xargs git pull
# Delete multiple branches
#git branch -D `git for-each-ref --format="%(refname:short)" refs/heads/...`
go = !gitgo
pushall = !git remote | xargs -L1 git push --all
# revert = checkout --
[color]
diff = true
grep = true
status = true
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = normal
frag = magenta bold
old = red bold
new = blue bold
whitespace = red reverse
[color "status"]
added = yellow
changed = green
untracked = cyan
[diff]
renames = copy
[log]
decorate = full
[push]
default = simple