Skip to content

Instantly share code, notes, and snippets.

@the-louie
Last active March 25, 2022 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save the-louie/7276c89a896be321fdcbe5c64f4f713c to your computer and use it in GitHub Desktop.
Save the-louie/7276c89a896be321fdcbe5c64f4f713c to your computer and use it in GitHub Desktop.
Open all changed files in vscode
#! /bin/bash
# git2code.sh
#
# lists all files in all commits between the supplied to HEAD, excludes all non-existing files.
#
# /// Louie 2021-04-23 and enormous imprevements by Wanders 2022-03-25
#
IFS=$'\n'
COMMITID="$1"
git diff -z --name-only --no-renames --diff-filter d $COMMITID..HEAD ':!*.svg' | xargs -0 code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment