====== gitconfig ====== **File:** ''~/.gitconfig'' ===== Identity ===== [user] name = Brennan Brown email = mail@brennanbrown.ca ===== Core ===== [core] editor = micro pager = bat --style=changes # bat shows git diff markers autocrlf = input # normalise line endings on commit quotePath = false # don't escape Unicode in paths fileMode = false # ignore chmod changes ===== Aliases ===== ^ Alias ^ Expands to ^ Purpose ^ | ''st'' | ''status'' | | | ''co'' | ''checkout'' | | | ''ci'' | ''commit'' | | | ''br'' | ''branch'' | | | ''s'' | ''status -sb'' | short + branch name | | ''d'' | ''diff'' | | | ''ds'' | ''diff --staged'' | staged diff | | ''l'' | ''log --oneline'' | | | ''ll'' | ''log --oneline --graph --decorate'' | | | ''lg'' | ''log --oneline --graph --decorate --all'' | all branches | | ''hist'' | ''log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'' | dated graph | | ''amend'' | ''commit --amend --no-edit'' | amend without changing message | | ''cm'' | ''commit -m'' | | | ''new'' | ''checkout -b'' | new branch | | ''del'' | ''branch -D'' | force delete branch | | ''save'' | ''stash push -m'' | named stash | | ''pop'' | ''stash pop'' | | | ''uncommit'' | ''reset --soft HEAD^'' | undo last commit, keep changes | | ''wipe'' | ''reset --hard HEAD'' | discard all changes | ===== Pull / Push / Branch ===== [pull] rebase = true # rebase on pull instead of merge autoStash = true # stash dirty state before pull [push] default = simple autoSetupRemote = true # auto-track upstream on first push [branch] sort = -committerdate # most recently touched branch first [fetch] prune = true # remove stale remote-tracking refs pruneTags = true ===== Diff / Merge ===== [diff] tool = vimdiff colorMoved = default # highlight moved lines differently [merge] tool = vimdiff conflictstyle = diff3 # show base + both sides in conflicts ===== See Also ===== * [[terminal:shell:start|Terminal Shell Index]] * [[terminal:tools:git|Git workflow]] * [[terminal:shell:dotfiles|Dotfiles index]] * [[terminal:start|Return to terminal]]