Ajay
Ajay

Reputation: 56

How to get the changed file names between 2 consecutive git pull?

I am trying to get the names of files that have been changed in 2 consecutive pull requests. So 2 developers have changed 2 diff files and pushed to github. When i try to pull it in 3rd repo i need to get the 2 changed filenames. Currently i am getting only the changed file name of the latest developer by using the following code.

git diff --diff-filter=ACMR --name-only @{1}.. 

If anyone have any idea please share.

Thankyou

Upvotes: 0

Views: 33

Answers (1)

aMoL Thite
aMoL Thite

Reputation: 970

You can use the syntax to get the log of commit with file changes. This only shows the list of changed files.

git log --stat

If you want to check the changes in the file then use

git log -p

you can limit the log entries by passing limit

git log -p -2

more at https://www.git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History

Upvotes: 2

Related Questions