Skip to content

Instantly share code, notes, and snippets.

@kipras
kipras / purge.sh
Last active December 29, 2015 09:09 — forked from vmassuchetto/purge.sh
#!/bin/sh
#
# From: https://gist.github.com/vmassuchetto/6225959#file-purge-sh
# Usage: run from within the Vagrant box, with sudo, e.g.:
# sudo ~/basebox-before-package.sh
# Then run "vagrant package" from outside the Vagrant box.
#
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
#!/bin/sh
#
# From: http://graysky.org/2008/12/git-branch-auto-tracking/
#
# git-track should be added to your path.
# Sets up auto-tracking of a remote branch with same base name.
# Can set up "git track" so it feels built-in:
# git config --global --add alias.track '!git-track'
#
# Update: changed the way current branch name is determined, see:
#!/bin/bash
#
# From: https://gist.github.com/michaeltwofish/5096740
# Kipras:
# - modified to run against develop instead of master
# - made a small fix to run within Git bash on Windows
# - uncommented local branch deleting (in original this was commented out,
# deleting only remote branches for some reason)
#
# Remove branches that have been fully merged to master, except dev