Verbose git checkout

Viewed 127

I need that each git checkout command will be accompanied with list of files changed in my local workspace. E.g. in the case I work in some repository and was synchronized to a specific branch. Then I decide to switch to another branch. I want to see list of files substituted at my local folder after performing last git checkout <second-branch>. How to achieve this requirement?

1 Answers

I think this is not exactly what you are after, but it should be very close. After checking out:

git diff --name-status HEAD@{1}

Also consider using --name-only.

If you want it to happen wight after every checkout, you should consider writing your own alias (bash alias or git alias).

Related