1
0

Git config + vim fugitive stuff

This commit is contained in:
2025-01-26 10:22:17 +01:00
parent 565cbf064a
commit 65aa80b8d8
2 changed files with 52 additions and 0 deletions

View File

@@ -47,3 +47,18 @@ vim.opt.incsearch = true
-- Make dotfile navigation bareble -- Make dotfile navigation bareble
vim.api.nvim_create_user_command('Dot', 'edit ~/.config/nvim', {}) vim.api.nvim_create_user_command('Dot', 'edit ~/.config/nvim', {})
-- Git
vim.api.nvim_create_user_command('Glog', function()
local args = {
'log',
'--graph',
'--abbrev-commit',
'--decorate',
}
local str = ''
for _, arg in pairs(args) do
str = str .. ' ' .. arg
end
vim.cmd.Git(str)
end, {})

37
.gitconfig Normal file
View File

@@ -0,0 +1,37 @@
[safe]
directory = /yay
[credential]
credentialStore = gpg
guiPrompt = false
helper =
helper = /usr/bin/git-credential-manager
[credential "https://dev.azure.com"]
useHttpPath = true
[color]
status = always
branch = always
diff = always
interactive = always
[user]
email = aligator.h0spital.e@gmail.com
name = Anton
[core]
editor = nvim
[push]
autoSetupRemote = true
[init]
defaultBranch = main
[commit]
gpgsign = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[alias]
ref = show -s --pretty=reference
lg = !max_length_dr=$(git log --format='%ar ' | wc -L) \
&& max_length=$(git log --format='%s ' | wc -L) \
&& git log --graph --abbrev-commit --decorate \
--format='%C(bold blue)%h%C(reset) - %C(bold green)%-%<('\"$max_length_dr\"')%ar:%C(reset)'\" \
\"'%C(white)%<('\"$max_length\"')%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'