Skip to content

Instantly share code, notes, and snippets.

View rothwerx's full-sized avatar

Jeremiah Roth rothwerx

View GitHub Profile
[alias]
co = checkout
st = status
ls = log --stat
cp = cherry-pick
lsshort = log --stat --abbrev-commit
lsnm = log --stat --no-merges
lslast = "!f() { \
git ls-tree --name-only HEAD $1 | while read filename; do echo \"$(git log -1 --date=iso --pretty=format:'%ad' -- $filename) $filename\"; done \
}; f"
@rothwerx
rothwerx / gist:7bdc7946402f6746468f412e678a72a7
Created June 15, 2022 04:10
Makefile: auto-incrementing
IMAGE_NAME := whatever/whatever
.PHONY: docker-build version-increment bc-check
docker-build: version-increment
DOCKER_BUILDKIT=1 docker buildx build -t $(IMAGE_NAME):v$(shell cat version.txt) .
version-increment: bc-check
bc <<< "1 + $(shell cat version.txt)" > version.txt
bc-check: