Skip to content

Instantly share code, notes, and snippets.

@wrtsprt
Created February 15, 2011 09:57
Show Gist options
  • Select an option

  • Save wrtsprt/827339 to your computer and use it in GitHub Desktop.

Select an option

Save wrtsprt/827339 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment