Skip to content

Instantly share code, notes, and snippets.

@paulegradie
Created October 24, 2018 21:09
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 paulegradie/98b988fba411b65f20bc621604ae6e2a to your computer and use it in GitHub Desktop.
Save paulegradie/98b988fba411b65f20bc621604ae6e2a to your computer and use it in GitHub Desktop.
How to find all new files you've added to a branch
git diff {old_branch}...{new_branch} --name-status --diff-filter=A
e.g. to find a enw file added since branching from master:
git diff master...gradie/sandbox --name-status --diff-filter=A
Options for `--diff-filter
Added (A)
Copied (C)
Deleted (D)
Modified (M)
Renamed (R)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment