Last active
May 10, 2020 07:31
-
-
Save longtc/dba67bd64ca5fc9972ffa9fe91cdedd8 to your computer and use it in GitHub Desktop.
git config
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
[user] | |
email = [email protected] | |
name = Your Name | |
[alias] | |
a = add | |
aa = add --all | |
br = branch | |
bbr = branch -v | |
brall = branch -avvl | |
co = checkout | |
cb = checkout -b | |
ci = commit | |
ca = commit -a | |
cm = commit -m | |
cam = commit -a -m | |
count = "!f() { compareBranch=${1-master}; git rev-list --count HEAD ^$compareBranch; }; f" | |
squashbase = "!f() { branchName=${1-master}; commitCount=$(git count $branchName); git rebase -i HEAD~$commitCount; }; f" | |
pullbase = "!f() { branchName=${1-master}; git checkout $branchName && git pull --rebase && git checkout - && git rebase -i $branchName; }; f" | |
df = diff | |
dt = difftool | |
f = fetch | |
fo = fetch origin | |
pom = push origin master | |
puf = pull --ff-only | |
pur = pull --rebase | |
ready = rebase -i @{u} | |
arem = remote add origin | |
noff = merge --no-ff | |
ff = merge --ff-only | |
st = status | |
sb = status -sb | |
unstage = reset HEAD -- | |
cg = config --global -e | |
ls = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -- | |
when = for-each-ref --sort=committerdate --format='%(refname:short) * %(authorname) * %(committerdate:relative)' refs/remotes/ | |
[push] | |
default = current | |
[merge] | |
conflictstyle = diff3 | |
ff = no | |
[color] | |
ui = auto | |
[color "branch"] | |
current = red reverse | |
local = red | |
remote = green | |
[color "diff"] | |
meta = yellow bold | |
frag = magenta bold | |
old = red bold | |
new = green bold | |
[color "status"] | |
added = yellow | |
changed = green | |
untracked = cyan | |
[core] | |
editor = code --wait | |
autocrlf = true #true for windows, input for linux | |
safecrlf = false | |
pager = less -R | |
[help] | |
autocorrect = 1 #fucking magic! | |
[diff] | |
tool = default-difftool | |
[difftool "default-difftool"] | |
cmd = code --wait --diff $LOCAL $REMOTE | |
[credential] | |
helper = wincred |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment