-1

In git some days back (Around 1 month) i pushed wrong files to repository with a commit message 'Test' . In local system i want to see those files with commit message 'Test' in a particular branch .How to check ?

amiya
  • 1
  • 4

1 Answers1

1

First you can try searching through the Git log to find commits matching the text Test:

git log -g --grep=Test

Then you may view the files in a given commit using this:

git show --pretty="" --name-only 7dj82lb3

where 7dj82lb3 is the SHA-1 hash of the commit whose commit message matches your search text.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360