Skip to content

Instantly share code, notes, and snippets.

@walkure
Last active August 1, 2023 06:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walkure/6770f2e6a8f4415aecef605c35a97fa7 to your computer and use it in GitHub Desktop.
Save walkure/6770f2e6a8f4415aecef605c35a97fa7 to your computer and use it in GitHub Desktop.
git config
[alias]
st = status
co = checkout
sw = switch
br = branch
cp = cherry-pick
df = diff
cm = commit -m
unstage = reset -q HEAD --
uncommit = reset --mixed HEAD~
last = log -1 HEAD --format=format:"%Cred%H"
graph = log --graph -10 --branches --remotes --tags --format=format:'%Cgreen%h %Creset→ %<(75,trunc)%s (%cN, %ar) %Cred%d' --date-order
history = log -10 --format=format:'%Cgreen%h %Creset→ %s (%cN, %ar)'
amend = commit --amend
back = checkout "-"
nevermind = !git reset --hard HEAD && git clean -d -f
pull-sub = !git submodule foreach git pull origin master
fa = fetch --all -p
master = !git switch `git remote show origin | sed -n '/HEAD branch/s/.*: //p'`
[diff]
tool = WinMerge
[difftool "WinMerge"]
path = C:/Program Files (x86)/WinMerge/WinMergeU.exe
cmd = \"C:/Program Files (x86)/WinMerge/WinMergeU.exe\" -f \"*.*\" -e -u -r -wl -wr -dl \"LOCAL\" -dr \"REMOTE\" \"$LOCAL\" \"$REMOTE\"
[merge]
tool = WinMerge
[mergetool "WinMerge"]
path = C:/Program Files (x86)/WinMerge/WinMergeU.exe
cmd = \"C:/Program Files (x86)/WinMerge/WinMergeU.exe\" -e -u \"$LOCAL\" \"$REMOTE\" \"$MERGED\"
[alias]
windiff = difftool -y -d -t WinMerge
winmerge = mergetool -y -t WinMerge
[mergetool]
keepBackup = false
[color]
ui = auto
[core]
quotepath = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment