Skip to content

Instantly share code, notes, and snippets.

@toloco
Last active February 13, 2023 17:55
Show Gist options
  • Save toloco/795f58d89c72af14a7693ed652e16092 to your computer and use it in GitHub Desktop.
Save toloco/795f58d89c72af14a7693ed652e16092 to your computer and use it in GitHub Desktop.
Git config for the lazies
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
type = cat-file -t
dump = cat-file -p
publish = "!git push --set-upstream origin \"$(git rev-parse --abbrev-ref HEAD)\""
refresh = "!git pull origin \"$(git rev-parse --abbrev-ref HEAD)\""
dev-rebase = pull --rebase origin dev
dev-theirs-rebase = rebase -Xtheirs dev
master-rebase = pull --rebase origin master

Git config for the lazies

This is the git config I'm using, basically, this gist becomes useful every time I need to setup a new environment.

And my favourite combined command of all time, for these times, that you prefer to off-load running test to your CI tool: git commit -a --amend && git publish -f

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