Skip to content

Instantly share code, notes, and snippets.

@asaaki
Created July 22, 2024 16:57
Show Gist options
  • Save asaaki/7739f7d030657bf7199bf9bd2634c2ce to your computer and use it in GitHub Desktop.
Save asaaki/7739f7d030657bf7199bf9bd2634c2ce to your computer and use it in GitHub Desktop.
[git] get list of files which changed
# unstaged changes
git diff --name-only --diff-filter=ACMR | sed 's| |\\ |g'
# staged changes
git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment