" with the identifier (hash) of the first commit, and " In this article you will learn that how you can find difference between two commits and get name of changed file between two commits. List Only the Names of Files that Changed Between Two Commits How to List Only the Names of Files that Changed Between Two Commits? To list only the names of files that changed between two commits, you can use the following Git command: Replace " For example, if you want to see the names of the files that changed between the latest commit and the one before it, you would run: This will display a list of the names of the files that were modified, added, or deleted in the latest commit, compared to the previous commit.How to list only the names of files that changed between two commits
git diff --name-only <commit1> <commit2>
<commit1>
" with the identifier (hash) of the first commit, and "<commit2>
" with the identifier of the second commit. The "--name-only
" option tells Git to only display the names of the files that changed, rather than the complete diff output.git diff --name-only HEAD^ HEAD
Tags:
Share: