In order to view the contents of a file in another branch in git, we use the following template:

git show nameOfBranch:pathOfFile

If we wanted to use it to view a file in the testing branch, we would do the following:

git show testing:/src/components/Dashboard/Dashboard.js