Skip to content

Instantly share code, notes, and snippets.

@clagiordano
Created September 23, 2020 11:32
Show Gist options
  • Save clagiordano/b00bfcbaed3d5f2f435b0e7074a2c228 to your computer and use it in GitHub Desktop.
Save clagiordano/b00bfcbaed3d5f2f435b0e7074a2c228 to your computer and use it in GitHub Desktop.
.gitconfig
[user]
email = <YOUR_MAIL>
name = <YOUR_NAME>
[push]
default = current
[merge]
tool = <YOUR_PREFERRED_MERGE_TOOL>
[alias]
b = branch
ca = commit -a
cam = commit -a -m
cob = checkout -b
co = checkout
d = diff
down = !git fetch --all --prune && git pull
dw = diff -w
lg1 = log --graph --abbrev-commit --decorate --date=relative --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(bold yellow)%d%C(re>
lg2 = 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 yellow)%d%C(reset)%n'' %C(white)%s%C(reset) >
lg = !git lg1
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
me = merge --no-ff
r = remote
shp = stash pop
sh = stash
s = status
sync = !f(){ git co "$1" && git me "$2"; };f
t = tag --sort version:refname
up = !f() { git add --all && git commit -m "$1" && git push }; f
cup = "!f() { git cam \"Update composer dependencies\"; }; f"
c = commit
cm = commit -m
camm = commit -a --amend -m
pt = push --tags
cp = cherry-pick
[core]
excludesfile = <YOUR_HOME_FOLDER>/.gitignore
[pull]
rebase = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment