Skip to content

Instantly share code, notes, and snippets.

@petercamfield
Last active October 4, 2019 07:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petercamfield/88fb472eac6f87faf38119a0ae8120cc to your computer and use it in GitHub Desktop.
Save petercamfield/88fb472eac6f87faf38119a0ae8120cc to your computer and use it in GitHub Desktop.
Open all files listed by git diff in Visual Studio
alias vsd='"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe" //edit $(git diff --name-only)'
@petercamfield
Copy link
Author

petercamfield commented Oct 3, 2019

Useful for giving files the once over in Visual Studio prior to committing

  • Simple to open only modified or added files by substituting diff command to git diff --name-only --diff-filter=AM
  • Simple to open only staged files by substituting diff command to git diff --name-only --staged
  • Simple to open any other programme instead of VS 2019

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