Skip to content

Instantly share code, notes, and snippets.

@stmswitcher
Last active July 30, 2016 10:20
Show Gist options
  • Save stmswitcher/bf3222df34ef797fccf89da01c90d115 to your computer and use it in GitHub Desktop.
Save stmswitcher/bf3222df34ef797fccf89da01c90d115 to your computer and use it in GitHub Desktop.
Creates archive with updated git files
#!/bin/bash
git status | grep -E "^\s+(modified|new\sfile)" | sed -E "s/.+:\s+//" | tar -cvf test.tar -T - --no-recursion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment