diff --git a/git/.gitconfig b/git/.gitconfig index 7655101..bfef090 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -1,22 +1,41 @@ -[credential] - helper = osxkeychain +[core] + editor = code --wait + excludesfile = ~/.gitignore_global + + # Make `git rebase` safer on macOS + # More info: + trustctime = false +[alias] + undo = reset --soft HEAD~1 + pom = push origin main + + # Show verbose output about tags, branches, remotes, aliases and contributors + tags = tag -l + branches = branch -a + remotes = remote -v + aliases = config --get-regexp alias + contributors = shortlog --summary --numbered + new = !git init && git symbolic-ref HEAD refs/heads/main [user] email = jake@jarv.is name = Jake Jarvis signingkey = 3BC6E5776BF379D36F6714802B0C9CF251E69A39 -[gpg] - program = /usr/local/MacGPG2/bin/gpg -[commit] - gpgsign = true [push] default = current -[core] - editor = nano - excludesfile = ~/.gitignore_global -[github] - user = jakejarvis [pull] rebase = true +[diff] + tool = default-difftool +[difftool "default-difftool"] + cmd = code --wait --diff $LOCAL $REMOTE +[credential] + helper = osxkeychain +[commit] + gpgsign = true +[gpg] + program = /usr/local/MacGPG2/bin/gpg +[github] + user = jakejarvis [hub] host = github.com [filter "lfs"] diff --git a/macos/macos.sh b/macos/macos.sh index 149b624..5a45bd4 100755 --- a/macos/macos.sh +++ b/macos/macos.sh @@ -15,6 +15,10 @@ if test ! "$(which brew)"; then /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" fi +# Disable analytics +# https://docs.brew.sh/Analytics +brew analytics off + # Update Homebrew recipes brew update diff --git a/ssh/.ssh/config b/ssh/.ssh/config index 924336e..4f56dd1 100644 --- a/ssh/.ssh/config +++ b/ssh/.ssh/config @@ -50,12 +50,6 @@ Host github.com IdentityFile ~/.ssh/id_ed25519 IdentitiesOnly yes -Host kali - HostName 50.116.62.61 - User root - IdentityFile ~/.ssh/id_rsa - IdentitiesOnly yes - Host hashbang HostName de1.hashbang.sh User jakej @@ -64,8 +58,3 @@ Host hashbang Host *.ssh.wpengine.net IdentityFile ~/.ssh/wpe_devkit - -Host 192.168.67.141 - HostName 192.168.67.141 - User root - diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 3f6095a..e59ec71 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -83,14 +83,14 @@ alias gs="git status -sb" alias gl="git log --pretty=short" alias gd="git diff" alias gds="git diff --staged" -alias gpom="git push origin master" -alias glom="git pull origin master" +alias gpom="git push origin main" +alias glom="git pull origin main" alias gpo="git push origin" # + branch name alias glo="git pull origin" # + branch name -alias gphm="git push hosted master" # self-hosted git +alias gphm="git push hosted main" # self-hosted git alias gb="git checkout" # + existing branch name alias gbn="git checkout -b" # + new branch name -alias grm="git rebase -i origin/master" +alias grm="git rebase -i origin/main" alias gsub="git submodule update --recursive --remote" alias gundo="git reset --soft HEAD~1" alias greset="git reset" @@ -133,8 +133,9 @@ alias yarn-reset="rm -rf node_modules && yarn cache clean && yarn install" # Hugo # make_hugo() { + # parentheses lets us cd to Hugo path without changing user's current location ( - cd ~/golang/src/github.com/gohugoio/hugo \ + cd "$GOPATH/src/github.com/gohugoio/hugo" \ && git pull origin master \ && git reset --hard HEAD \ && git checkout master \