Last active
April 14, 2024 02:48
-
-
Save satinP/3a341afa6d49c85cc67b90ceccb3320e to your computer and use it in GitHub Desktop.
Git config values with aliases and pretty logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is my daily use gitconfig, you should check if it fits your needs too | |
# Copy and paste into ~/.gitconfig | |
# Run `git alias` on terminal to show aliases and its command | |
# https://git-scm.com/docs/pretty-formats | |
[user] | |
name = X X | |
email = x@x.com | |
[push] | |
autoSetupRemote = true | |
default = current | |
[core] | |
editor = vim | |
pager = less -FX | |
[rerere] # Reuse Recorded Resolution - Auto resolves conflicts thare were resolved before | |
enabled = true | |
[column] | |
ui = auto | |
[branch] | |
sort = -committerdate | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
[pretty] | |
graph = %C(green)%h %C(auto)%d %C(reset)%s %C(blue)%an %C(magenta)%ch | |
[alias] | |
a = add | |
b = branch --verbose | |
c = commit | |
ca = commit --amend | |
cm = commit -m | |
co = checkout | |
cp = cherry-pick | |
d = diff | |
f = fetch -p | |
m = merge | |
p = pull | |
rb = rebase | |
rh = reset HEAD~ | |
s = status --branch | |
sta = stash --all | |
pf = push --force-with-lease | |
l = log --graph --pretty=graph --decorate-refs-exclude="tags/*" -5 | |
lf = log --graph --pretty=graph --all | |
la = log --graph --pretty=graph --all -5 | |
alias = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\\t -> \\2/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment