Skip to content

Instantly share code, notes, and snippets.

@duongphuhiep
Last active May 25, 2021 12:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duongphuhiep/0801616d8c87bb71c535e8fbcd71e263 to your computer and use it in GitHub Desktop.
Save duongphuhiep/0801616d8c87bb71c535e8fbcd71e263 to your computer and use it in GitHub Desktop.
fix git command
[user]
name = DUONG Phu-Hiep
email = duongphuhiep@gmail.com
[core]
autocrlf = true
editor = code
precomposeunicode = true
excludesfile =
[alias]
s = status
desc = describe
unstage = reset -q HEAD --
unstageall = reset --mixed HEAD
discard = checkout --
nevermind = !git reset --hard HEAD && git clean -d -f
save = commit -m
history = log -10 --format=format:'%Cgreen%h %Creset• %s (%cN, %ar)'
changes = log --format=format:'%h%x3B%s%x3B%cN%x3B%ai'
uncommit = reset --mixed HEAD~
invert = revert
last = log -1 HEAD --format=format:"%Cred%H"
last = log -1 HEAD --format=format:%Cred%H
summary = status -u -s
graph = log --graph -10 --branches --remotes --tags --format=format:'%Cred%h %Creset• %Cgreen%d %Creset %<(75,trunc)%s %Cred(%cN, %ar)' --date-order
branchout = checkout -b
tags = tag
branches = branch -a -v
stashes = stash list
remotes = remote -v
prestage = diff -w --word-diff=color
precommit = diff --cached -w --word-diff=color --word-diff-regex='[^[:space:]<>]+'
move = mv
remove = rm
notmerged = branch --no-merged
unstash = stash pop
what = show -w
untrack = rm -r --cached
rewrite = rebase -i
amend = commit --amend
back = checkout "-"
contributors = shortlog -s -n --no-merges
filetrail = log --follow -p -w
mergetrail = log --ancestry-path --merges
diffunmerged = diff --name-only --diff-filter=U
aliases = var -l
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep ^h | cut -c 3-
sshow = "!f() { git stash show stash^{/$*} -p; }; f"
sapply = "!f() { git stash apply stash^{/$*}; }; f"
ssave = stash save
fetchall = fetch --all --tags
stagedeleted = !git rm $(git ls-files --deleted)
amendDateNow = commit --amend --no-edit --date="now"
branchContains = branch --contains
isAncestor = "!f() { if $(git merge-base --is-ancestor $*); then echo 'true'; else echo 'false'; fi; }; f"
[blame]
date = relative
[push]
default = current
[pull]
rebase = true
[diff]
tool = meld
algorithm = patience
guitool = meld
[merge]
tool = meld
conflictstyle = diff3
[mergetool]
keepBackup = false
[rerere]
enabled = true
[difftool "meld"]
path = C:/Program Files (x86)/Meld/meld.exe
cmd = \"C:/Program Files (x86)/Meld/meld.exe\" \"$LOCAL\" \"$REMOTE\"
@duongphuhiep
Copy link
Author

git history -20 readme.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment