Skip to content

Instantly share code, notes, and snippets.

Created September 22, 2017 04:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Get the change list when git push
# Find the common ancestor of current hash and origin/master
# Command inside `` will be executed and pass to the variable
common_ancestor=`git merge-base HEAD origin/master`
# --diff-filter=ACMRT Only show files which is appended, copied, modified, renamed or type-changed
changelist=`git diff $common_ancestor HEAD --name-only --diff-filter=ACMRT`
Copy link

sstruct commented Sep 27, 2019

git diff origin/master --name-only --diff-filter=ACMRT


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment