1
0
Tom McKenzie 3 жил өмнө
parent
commit
56571bbecf
2 өөрчлөгдсөн 28 нэмэгдсэн , 8 устгасан
  1. 21 7
      .gitconfig
  2. 7 1
      .rc.d/aliases.sh

+ 21 - 7
.gitconfig

@@ -27,18 +27,25 @@
 [help]
     autocorrect = 10
 
-[diff]
-    tool = default-difftool
 
-[difftool "default-difftool"]
+[merge]
+    tool = vscode
+[mergetool "vscode"]
+    cmd = code --wait --diff $LOCAL $REMOTE
+
+[diff]
+    tool = vscode
+[difftool "vscode"]
     cmd = code --wait --diff $LOCAL $REMOTE
-[difftool "Kaleidoscope"]
-  cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
 
 [alias]
+    gp = push
+    gpp = publish
+    rb = pull --rebase
+    rbc = rebase --continue
+    rba = rebase --abort
     fancy-log = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(cyan)<%an>%Creset' --abbrev-commit --date=relative
     branches = for-each-ref --count=10 --sort='-authordate:iso8601' --format=' %(color:green)%(authordate:relative) %09%(color:white)%(objectname:short) %(color:yellow)%(refname:short) %09%(color:white)%(upstream:track) %(contents:subject)' refs/heads --no-merged
-    timesheet = log --pretty=format:"%C(yellow)%h%Creset  %C(green)%ad%Creset  %C(cyan)%s" --author="`git config --get user.name`" --since='6am'
     edit-conflicted = ! git diff --name-only | uniq | xargs code
     history = log -p --
 	pushf = push --force-with-lease
@@ -48,10 +55,10 @@
     fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
     last = rev-list -1 HEAD
 [core]
-	editor = vim
 	excludesfile = /Users/tom/.gitignore_global
 	whitespace = tab-in-indent,trailing-space,space-before-tab
 	ignorecase = false
+	editor = vim -c 'startinsert'
 
 [merge]
 	tool = code
@@ -68,3 +75,10 @@
 #	rebase = preserve
 [pull]
 	ff = only
+[advice]
+	detachedHead = false
+[filter "lfs"]
+	clean = git-lfs clean -- %f
+	smudge = git-lfs smudge -- %f
+	process = git-lfs filter-process
+	required = true

+ 7 - 1
.rc.d/aliases.sh

@@ -15,7 +15,7 @@ alias export-env="export \$(grep -v '^#' .env | xargs -0)"
 
 # docker
 alias d='docker'
-alias dc='docker-compose'
+alias dc='docker compose'
 
 # k8s
 alias k='kubectl'
@@ -43,3 +43,9 @@ alias dockerps="docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Status}}'"
 function title {
   echo -ne "\033]0;"$*"\007"
 }
+
+alias branchpr="git checkout -b fix/grrowl-\$(date +%s) && gh pr create -w"
+
+# generate password
+alias pwgen="openssl rand -base64"
+