Skip to content

Instantly share code, notes, and snippets.


Tobias Büschel tobiasbueschel

View GitHub Profile
tobiasbueschel /
Last active Mar 31, 2022
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.