Skip to content

Instantly share code, notes, and snippets.

@omarrodriguez15
omarrodriguez15 / Git-OneLiners.ps1
Last active August 21, 2020 14:23
Collection of powershell one liners for git. I believe there is a more efficient call that deletes multiple tags based on a regex but can't find it.
git tag -l "test-18.*" | %{git tag -d $_}
git tag -l "build-*-18.4.0.*" | %{ git push origin --delete $_; git tag -d $_ }
# Don't show file in changes
git update-index --skip-worktree <file>
# List files you are skipping
git ls-files -v . | sls ^S
# Undo skip file
git update-index --no-skip-worktree <file>
@bigslycat
bigslycat / docker-cheatsheet.sh
Last active January 22, 2020 17:04
Docker commands cheatsheet
# Stop all running containers
docker stop $(docker ps -q | paste -sd " " -)
# Stop and remove all containers
docker rm -f $(docker ps -aq | paste -sd " " -)
# Stop and remove all images
docker rmi -f $(docker images -aq | paste -sd " " -)