Skip to content

Instantly share code, notes, and snippets.

@nkthiebaut
Last active February 9, 2024 05:14
Show Gist options
  • Save nkthiebaut/5ab2a849683dcb9682ff06a4dfa3deca to your computer and use it in GitHub Desktop.
Save nkthiebaut/5ab2a849683dcb9682ff06a4dfa3deca to your computer and use it in GitHub Desktop.
Basic git config and aliases
[alias]
st = status
di = diff
co = checkout
ci = commit
br = branch
sta = stash
llog = log --date=local
flog = log --pretty=fuller --decorate
lg = log --graph --abbrev-commit --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
lol = log --graph --decorate --oneline
lola = log --graph --decorate --oneline --all
blog = log origin/master... --left-right
ds = diff --staged
fixup = commit --fixup
squash = commit --squash
unstage = reset HEAD
rum = rebase master@{u}
[core]
# pager = less -FXRS -x2
excludesfile = ~/.gitignore_global
# pager = delta --dark
editor = vim
[apply]
whitespace = nowarn
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[branch]
autosetupmerge = true
[rebase]
autosquash = true
[push]
default = current
[rerere]
enabled = true
[merge]
tool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[pull]
rebase = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment