Skip to content

Instantly share code, notes, and snippets.

@pcampina
Created October 3, 2024 00:47
Show Gist options
  • Save pcampina/6d8d320d9c33ffbef20cd0f03a4cfc7f to your computer and use it in GitHub Desktop.
Save pcampina/6d8d320d9c33ffbef20cd0f03a4cfc7f to your computer and use it in GitHub Desktop.
Git Config
[user]
name = Name
email = [email protected]
[init]
defaultBranch = main
[github]
user = username
[color]
ui = auto
[color "status"]
added = green
changed = yellow
untracked = red
[color "branch"]
current = magenta
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
[alias]
me = config user.name
st = status -sb
co = checkout
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
unstage = reset HEAD --
undo = reset --soft HEAD~1
committers = !(git log | grep Author | sort | uniq -c | sort -n -r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment