add .gitconfig

This commit is contained in:
TheK4n 2021-12-24 21:52:51 +00:00
parent cb5ecfda23
commit f43eaecc1f
4 changed files with 51 additions and 7 deletions

49
.gitconfig Normal file
View File

@ -0,0 +1,49 @@
[core]
excludesfile = ~/.gitignore
editor = nvim
autocrlf = true
[init]
defaultBranch = master
[push]
default = simple
[color]
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
ui = auto
[alias]
a = "!git status --short | peco | awk '{print $2}' | xargs git add"
d = diff
co = checkout
ci = commit
ca = commit -a
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)"
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)"
st = status
br = branch
ba = branch -a
bm = branch --merged
bn = branch --no-merged
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}"
hist = log --pretty=format:\"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)\" --graph --date=relative --decorate --all
llog = log --graph --name-status --pretty=format:\"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset\" --date=relative
open = "!hub browse"
type = cat-file -t
dump = cat-file -p
find = "!f() { git log --pretty=format:\"%h %cd [%cn] %s%d\" --date=relative -S'pretty' -S\"$@\" | peco | awk '{print $1}' | xargs -I {} git diff {}^ {}; }; f"
# edit conflicted file on merge
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; vim `f`"
# add conflicted file on merge
add-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; git add `f`"
[github]
user = "TheK4n"
email = "djvlad967891@gmail.com"

BIN
.swp Normal file

Binary file not shown.

View File

@ -11,6 +11,7 @@ let g:airline#extensions#keymap#enabled = 0 "Не показывать теку
let g:airline_section_z = "\ue0a1:%l/%L Col:%c" "Кастомная графа положения курсора let g:airline_section_z = "\ue0a1:%l/%L Col:%c" "Кастомная графа положения курсора
let g:Powerline_symbols='unicode' "Поддержка unicode let g:Powerline_symbols='unicode' "Поддержка unicode
let g:airline#extensions#xkblayout#enabled = 0 let g:airline#extensions#xkblayout#enabled = 0
let g:airline#extensions#branch#enabled=1
set ttimeoutlen=10 "Понижаем задержку ввода escape последовательностей set ttimeoutlen=10 "Понижаем задержку ввода escape последовательностей
let &t_SI.="\e[5 q" "SI = режим вставки let &t_SI.="\e[5 q" "SI = режим вставки

View File

@ -28,9 +28,3 @@ ssh:
echo -e "\n" >> ~/.ssh/config echo -e "\n" >> ~/.ssh/config
cat .ssh/config >> ~/.ssh/config cat .ssh/config >> ~/.ssh/config
git:
git config --global user.email "djvlad967891@gmail.com"
git config --global user.name "TheK4n"
git config --global core.editor vim
git config --global init.defaultBranch main
git config --global core.autocrlf true