Skip to content

Instantly share code, notes, and snippets.

@jish
jish / branch_cleanup.rb
Created July 15, 2013 02:02
Branch cleanup. Made this a private gist to begin with, but people keep asking me for a link to it. Horray for open source! (:
#!/usr/bin/env ruby
puts "Starting..."
branches = `git branch --merged`.split("\n").map { |branch| branch.strip }
pattern = (ARGV.shift || `whoami`).strip
branches.select! { |branch| branch.match(pattern) }
count = branches.size
@dadah89
dadah89 / gist:4062572
Created November 12, 2012 22:45
du df
du -h --max-depth=1
df -h .