Skip to content

Instantly share code, notes, and snippets.

@shirlston
Created October 22, 2015 15:06
Show Gist options
  • Save shirlston/4c1a12decc43b8931b0e to your computer and use it in GitHub Desktop.
Save shirlston/4c1a12decc43b8931b0e to your computer and use it in GitHub Desktop.
Open files from diff master that match a regex in rubymine
#!/bin/bash
# dmgm
# Diff Master Grep (Ruby)Mine
# Open files from dm that match a regex in rubymine
# syntax:
# dmgm <regex>
git diff --name-only `git merge-base origin/master HEAD` | grep $1 | xargs mine
@shirlston
Copy link
Author

In actual use, I remove the filename extension to make it like an alias. You can replace "mine" with your editor of choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment