Skip to content

Instantly share code, notes, and snippets.

@ThisIsMissEm
Created January 19, 2024 20:01
Show Gist options
  • Select an option

  • Save ThisIsMissEm/eb176f07a67a74ac7c03589e1608f4a6 to your computer and use it in GitHub Desktop.

Select an option

Save ThisIsMissEm/eb176f07a67a74ac7c03589e1608f4a6 to your computer and use it in GitHub Desktop.

Revisions

  1. ThisIsMissEm created this gist Jan 19, 2024.
    67 changes: 67 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,67 @@
    [core]
    logallrefupdates=true
    autocrlf = false
    quotepath = false
    excludesfile = ~/.config/git/ignore
    [fetch]
    prune = true
    [push]
    default = current
    [pull]
    rebase = merges
    [branch]
    autoSetupMerge = always
    autoSetupRebase = always
    [rebase]
    abbreviateCommands = true
    [commit]
    template = ~/.config/git/commit_message
    [init]
    defaultBranch = main
    [user]
    name = <NAME>
    email = <USERNAME>@users.noreply.github.com
    [color]
    interactive = true
    status = true
    branch = true
    diff = true
    [diff "sopsdiffer"]
    textconv = sops -d
    [difftool "sourcetree"]
    cmd = opendiff \"$LOCAL\" \"$REMOTE\"
    path =
    [mergetool "sourcetree"]
    cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
    trustExitCode = true
    [alias]
    sw = switch
    st = status -sb
    ci = commit
    cif = commit --fixup
    cis = commit --squash
    cip = commit --patch
    co = checkout
    lp = log -p
    lm = log --pretty=format:' - %s' --merges origin/main..HEAD
    ll = log --pretty=oneline
    who = shortlog -s --
    ss = stash -u
    sp = stash pop
    cp = cherry-pick
    ra = rebase --abort
    rc = rebase --continue
    rs = rebase --skip
    fbc = branch --contains
    ftc = tag --contains
    unstage = reset HEAD --
    decommit = reset HEAD^1
    dc = decommit
    local-branches = !git branch -vv | cut -c 3- | awk '$3 !~/\\[/ { print $1 }'
    [include]
    path = ~/.config/git/config
    [filter "lfs"]
    clean = git-lfs clean -- %f
    smudge = git-lfs smudge -- %f
    process = git-lfs filter-process
    required = true