Skip to content

Instantly share code, notes, and snippets.

@baruchiro
Last active March 10, 2021 08:35
Show Gist options
  • Save baruchiro/95d5e0a3e4dde5d2642bbfb72d520a67 to your computer and use it in GitHub Desktop.
Save baruchiro/95d5e0a3e4dde5d2642bbfb72d520a67 to your computer and use it in GitHub Desktop.
My git configurations and aliases
# This is Git's per-user configuration file.
# Gist: https://gist.github.com/baruchiro/95d5e0a3e4dde5d2642bbfb72d520a67
[user]
email = baruchiro@gmail.com
name = Baruch Odem
[credential]
helper = manager
[includeIf "gitdir:C:/Checkmarx/"]
path = C:/Checkmarx/.gitconfig
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
pl = pull
ps = push
md = merge dev
mm = merge master
c = commit -m
ca = commit -am
s = switch
s = status
sd = switch dev
sm = switch master
r = restore
ra = restore .
a = add
xdf = clean -xdf
fa = fetch -a
graph = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
graphh = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
graphhh = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
[core]
editor = code --wait
[merge]
tool = vscode
guitool = vscode
[mergetool "vscode"]
cmd = code --wait $MERGED
[diff]
tool = vscode
guitool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[pull]
rebase = false
[fetch]
prune = false
[rebase]
autoStash = false

Git Config

  • Configure the name and email for personal and work info.
  • Very usefull aliases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment