Git shows files come along a specific commit

Print Friendly, PDF & Email

Sometimes we need to check which files were come along with a given commit so as to verify which is the missing file, for instance. I bet some of you have already known how to do that via a graphical user interface or terminal with git command. Briefly speaking, how can we accomplish this requirement in either of those tools?

Using git command

In this situation, git provides you the command show with the option --name-only and followed by a SHA commit. For example:

git show --name-only 766c6753d
The output of git show --name-only
The output of git show –name-only

Video: https://tosbourn.com/git-command-to-show-files-changed-in-a-commit/

Using Source Tree

Below is the screenshot I captured showing a commit and the files and other information come along with that commit shown in Source Tree.

A screenshot of the given commit viewed in Source Tree

Using GUI clients

From the official documentation, Git comes with built-in GUI tools for committing (git-gui) and browsing (gitk), but there are several third-party tools for users looking for platform-specific experience.

All manners which have been presented above are likely familiar with you although they could be new to many.

Hopefully, this post has given you a handy tips to work with git. All reconstructive comment are welcomed in the section comment below.

One thought on “Git shows files come along a specific commit

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.