Skip to content

Instantly share code, notes, and snippets.

@ans-ashkan
Last active September 11, 2019 08:50
Show Gist options
  • Save ans-ashkan/2a688f4581d427967ce3a2775aa43cd6 to your computer and use it in GitHub Desktop.
Save ans-ashkan/2a688f4581d427967ce3a2775aa43cd6 to your computer and use it in GitHub Desktop.
my .gitconfig
[filter "lfs"]
smudge = git-lfs smudge %f
required = true
clean = git-lfs clean %f
[user]
name = Ashkan Nourzadeh
email = a.nourzadeh@mabnadp.com
[push]
default = simple
[difftool "codecompare"]
cmd = 'C:\\Program Files\\Devart\\Code Compare\\codecompare.exe' -W \"$LOCAL\" \"$REMOTE\"
renames = true
[diff]
tool = codecompare
guitool = codecompare
[core]
editor = "'C:/Program Files/Sublime Text 3/sublime_text.exe' -n -w"
autocrlf = true
pager=cat
longpaths = true
commentchar = ";"
quotepath = false
excludesfile =
[difftool "sourcetree"]
cmd = 'C:/Program Files/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
cmd = 'C:/Program Files/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
trustExitCode = true
[alias]
co = checkout
br = branch
st = status -s -u
# lg = log --graph --branches --remotes --date=relative -20
lg = "!f() { git log --graph --branches --remotes --date=relative -${1:-20}; }; f"
last = "!f() { git log --graph -${1:-1} HEAD; }; f"
cane = commit --amend --no-edit
fu = "!f() { git commit --fixup $1; EDITOR=cat git rebase --interactive --autosquash $1~; }; f"
fa = "fetch --all -p -t"
rho = "!git reset --hard $(git rev-parse --symbolic-full-name HEAD@{u})"
rh = reset --hard
p = push
pf = push -f
d = diff
[format]
pretty = format:%C(yellow)%h%C(reset) %s%C(green)%d%C(reset) %C(cyan)%an%C(reset) %C(white)%ad%C(reset)%n
[credential]
helper = manager
modalprompt = true
[merge]
tool = bc4
[mergetool "bc4"]
path = c:/Program Files/Beyond Compare 4/bcomp.exe
[status]
relativePaths = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment