0

I'm currently on HEAD after pulling thousands of files with huge diffs. In pull and merge, we can get the summary of changed files (not the one with + and -, but just the list of changed file).

Is there a command to compare current HEAD with any hash commit and show only the name of files that is changed (I want to know what files is deleted by the latest pull to be precise).

_

NOTE: This is after I close the terminal after the pull, and I want to read again what is the deleted files. Using git diff is too heavy and make VSCode crash. GitHub commit diff also make my tab freeze.

Related to How can I see what has changed in a file before committing to git?

Muhammad Yasirroni
  • 1,512
  • 12
  • 22

1 Answers1

1

Is there a command to compare current HEAD with any hash commit and show only the name of files that is changed

I would do this by saying

git diff --stat <other-hash>

Once you learn to read the output it's tremendously informative, yet extremely compact; it's just a list of files and what was done to them.

An even more compact rendering that you might like better is

git diff --compact-summary <other-hash>

However, if you don't want even that much info, then you can say

git diff --name-only <other-hash>

But that is just a list of names; it gives you no idea what happened for each file.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • Thanks, using git diff without UI in VSCode powershell actually did not cause error since it fetch sequentially. And thank you, the name only really help because I want to find a particular name existing there or not. – Muhammad Yasirroni Nov 16 '22 at 02:29
  • Cool, thanks for letting me know; I wasn't sure which option would suit your needs. :) – matt Nov 16 '22 at 02:33