Skip to content

Instantly share code, notes, and snippets.

View ricventu's full-sized avatar
💭
don't run this at home

Riccardo Venturini ricventu

💭
don't run this at home
View GitHub Profile
@ricventu
ricventu / PHP command line through Docker.md
Last active March 22, 2023 07:35
PHP command line through Docker

PHP command line through Docker

PHP

in .bashrc on in .zshrc insert:

function php() {
    docker run --rm --interactive --tty \
 --user $(id -u):$(id -g) \
@ricventu
ricventu / git-prune-merged-branches.md
Last active March 20, 2023 08:48
Git prune merged branches

Delete local merged branches

  git branch --merged | grep -v  "master\|main\|develop" | sed 's/origin\///' | xargs git branch -d 

Delete remote merged branches

  git branch -r --merged | grep -v  "master\|main\|develop" | sed 's/origin\///' | xargs -n 1 git push -d origin