Skip to content

Instantly share code, notes, and snippets.

@lars-erik
Created December 19, 2014 16:32
Show Gist options
  • Save lars-erik/d31c6a600e7538ad0dda to your computer and use it in GitHub Desktop.
Save lars-erik/d31c6a600e7538ad0dda to your computer and use it in GitHub Desktop.
VS GIT Merge modified with commited
Title: Merge with unmodified
Command: [path to bat file]
Arguments: "%(ItemDir)" "$(ItemFilename)" "$(ItemExt)"
Initial dir: "$(ItemDir)"
Use output window
Don't prompt for args
Don't treat as unicode
Close on exit (disabled true)
@echo off
cd "%1"
git show "HEAD:./%2%3" > "%2.head%3"
copy "%2%3" "%2.local%3"
"%VS120COMNTOOLS%\..\IDE\vsdiffmerge" "%2.head%3" "%2.local%3" "%2.head%3" "%2%3" /m
del "%2.head%3"
del "%2.local%3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment