2

How to find the list of files that are changed or added during the last pull request.

Is there any specific command to identify the list of files changed in last pull request when conflit is not occured.

Jaypal Sodha
  • 2,238
  • 2
  • 10
  • 22

1 Answers1

1

One answer I found here, you can use

git log -m -1 --name-only --pretty="format:" <Merge SHA>

Another way of doing that would be to use

git log

You'll get a list of all the commits, where you can grab the latest commit "hash" (I don't know what's the exact terminology for that) and use

git show

You'll see which files are changed and what was changed in them.

Sahil
  • 1,387
  • 14
  • 41
  • 1
    git log command shows only the commits of particular author order by last updated date desc, and git show only shows local changes that are done at local level. – Jaypal Sodha Aug 17 '19 at 10:11
  • when you use git show with the commit hash you'll see a list of all the files changed. So when you rebase or merge with the lastest code, you can `git log` get the hash of the latest commit, then `git show ` and see which files are altered. – Sahil Aug 17 '19 at 10:13
  • @JaypalSodha I edited my answer please take a look. – Sahil Aug 17 '19 at 10:18
  • Glad I could help :) – Sahil Aug 17 '19 at 10:21