Skip to content

Instantly share code, notes, and snippets.

View rushi's full-sized avatar

Rushi Vishavadia rushi

View GitHub Profile
#!/usr/bin/env bash
# Do a git remote prune <remote_name>`. This will delete all stale remote-tracking branches under <remote_name>. These
# stale branches have already been removed from the remote repository referenced by <remote_name>, but are still locally
# available in remotes/<remote_name>
git remote | xargs -n 1 -t git remote prune
# Delete branches
# git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -d
@rushi
rushi / bash_prompt.sh
Last active April 4, 2022 09:58
Rushi's bash prompt for servers
# Rushi's bash prompt and profile setup script
# - Dervied from Ben Alman's bash prompt github.com/cowboy/dotfiles (LICENSE found there)
# - extended to add to remote servers, with common aliases
# Prompt Example:
# [user@hostname:~/.dotfiles]
# [11:14:45] $
if [[ ! "${prompt_colors[@]}" ]]; then
prompt_colors=(
@rushi
rushi / xola-checkout.md
Last active May 2, 2020 11:44
Opening the Xola checkout window