Skip to content

Instantly share code, notes, and snippets.

@telless
Last active September 9, 2021 16:03
Show Gist options
  • Save telless/169ef575a8ee02eeaa6b7b6c4c2ffe76 to your computer and use it in GitHub Desktop.
Save telless/169ef575a8ee02eeaa6b7b6c4c2ffe76 to your computer and use it in GitHub Desktop.
typical gitconfig
[user]
name = telless
email = [email protected]
[core]
excludesfile = ~/.gitignore_global
editor = vscode
# set autocrlf = true for Windows
autocrlf = input
safecrlf = true
[push]
default = simple
[help]
# Automatically correct and execute mistyped command after waiting for the given number of deciseconds
autoCorrect = 1
[alias]
# Shortcuts
co = checkout
ci = commit
st = status
br = branch
# Useful commands
prev = checkout -
amend = commit --amend --no-edit
pushf = push --force
please = push --force-with-lease
unstage = reset HEAD --
last = log -1 HEAD
free = branch -D
fall = fetch --all
# Tree-like log graph
hist = log --graph --abbrev-commit --decorate --all --format=format:\"%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(dim white) - %an%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset)\"
# Multialias
repush = !git add . && git amend && git please
clear = !git clean -df && git co -- .
# External commands
aliases = !git config -l | grep alias | cut -c 7-
# Reset origin HEAD
return = reset ORIG_HEAD
refuse = reset --hard HEAD
undo = reset --soft HEAD^
back = reset HEAD^1 --hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment