Skip to content

Instantly share code, notes, and snippets.

View tobiasbueschel's full-sized avatar
🎯
Focusing

Tobias Büschel tobiasbueschel

🎯
Focusing
View GitHub Profile
@tobiasbueschel
tobiasbueschel / gd-and-gds.md
Last active October 10, 2024 13:30
Alias: ignore package-lock.json and yarn.lock in git diff

Don't want to see package-lock.json and yarn.lock in your git diff? Here are two nifty aliases that hide these files from your diff.

alias gd="git diff -- :!package-lock.json :!yarn.lock"
alias gds="git diff --staged -- :!package-lock.json :!yarn.lock"

Alias: Git Push & Open PR using Chrome

GitHub and GitLab both give a very similar output after a git push command has been executed. Hence, we can construct an alias that allows us to push and automatically open Chrome to create a PR.

This is what GitHub outputs after git push has been executed:

Counting objects: 4, done.
Delta compression using up to 12 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 3.01 KiB | 3.01 MiB/s, done.