Skip to content

Instantly share code, notes, and snippets.

@mpowaga
Created April 16, 2020 12:06
Show Gist options
  • Save mpowaga/f85535bbe0623be8679a4f8e9bb2853d to your computer and use it in GitHub Desktop.
Save mpowaga/f85535bbe0623be8679a4f8e9bb2853d to your computer and use it in GitHub Desktop.
Prettier changed files between branches
BRANCH=develop && git diff --name-status $BRANCH | awk 'BEGIN { printf "prettier --write {" } END { printf "}" } /^[MA][[:space:]](.*)/ { printf $2; printf "," }' | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment