feat: update gitcofig

This commit is contained in:
2024-02-20 19:24:22 +08:00
parent b63fb4494c
commit 3fad1b11f4
2 changed files with 61 additions and 46 deletions
+6 -6
View File
@@ -19,12 +19,12 @@ set -gx EDITOR vim
# alias # alias
# git # git
abbr -a gitb "git branch --show-current | tr -d '\n' | pbcopy" alias gitb="git branch --show-current | tr -d '\n' | pbcopy"
abbr -a gci "golangci-lint run -c=~/.dotfile/.golangci.yml ./..." alias gci="golangci-lint run -c=~/.dotfile/.golangci.yml ./..."
abbr -a gmt "go mod tidy" alias gmt="go mod tidy"
abbr -a gtc "go test -gcflags=all=-l -cover ./..." alias gtc="go test -gcflags=all=-l -cover ./..."
abbr -a swg "swag init -o docs -g " alias swg="swag init -o docs -g "
abbr -a sws "swagger serve -F=swagger" alias sws="swagger serve -F=swagger"
function gtr function gtr
go test -gcflags=all=-l -v -run="$1" go test -gcflags=all=-l -v -run="$1"
+17 -2
View File
@@ -4,14 +4,26 @@
[core] [core]
autocrlf = input autocrlf = input
quotepath = false quotepath = false
editor = /usr/local/bin/nvim editor = nvim
excludesfile = ~/.dotfile/git/.gitignore excludesfile = ~/.dotfile/git/.gitignore
[push] [push]
default = current default = current
[pull] [pull]
rebase = false rebase = false
[color]
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
ui = auto
[merge] [merge]
tool = vimdiff tool = nvimdiff
[difftool "nvimdiff"]
cmd = nvim -d \"$LOCAL\" \"$REMOTE\"
[mergetool "nvimdiff"]
cmd = nvim -d \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[includeIf "gitdir:~/workrepo/"] [includeIf "gitdir:~/workrepo/"]
path = ~/.workgitconfig path = ~/.workgitconfig
[branch] [branch]
@@ -23,6 +35,9 @@
st = status st = status
ap = add -p ap = add -p
br = branch br = branch
ba = branch -a
bm = branch --merged
bn = branch --no-merged
pl = pull pl = pull
pt = push origin --tags pt = push origin --tags
merge2 = !sh -c '_CURRENT_BRANCH=$(git symbolic-ref --short HEAD) && git checkout $1 && git merge $_CURRENT_BRANCH && git checkout $_CURRENT_BRANCH' - merge2 = !sh -c '_CURRENT_BRANCH=$(git symbolic-ref --short HEAD) && git checkout $1 && git merge $_CURRENT_BRANCH && git checkout $_CURRENT_BRANCH' -