Skip to content

Instantly share code, notes, and snippets.

@wrtsprt
wrtsprt / open_git_conflicting_files_in_textmate.rb
Created February 15, 2011 09:57
This snippets gets all conflicting (unmerged) files from the current git repo and opens them in textmate.
#!/usr/bin/ruby
all = `git ls-files -u`.split("\n")
unless all.empty?
file_names = all.collect do |info|
info.split("\t").last
end
%x[mate #{file_names.uniq.join(" ")}]
else
puts "open conflicted files - no files found."
end