How to fit canvas to a layer in Photoshop

You are copying a background layer to a canvas, but the canvas is too small to fully display the layer, the result is the layer is cut off. But the size of the background layer may be just what you want for the canvas. You may want to resize the canvas to fit the image or the layer you currently selected.

Here is an example, I copied a layer from another PSD file, the have different canvas size

photoshop big layer small canvas cut off

I know crop will do the trick, but the fact is I don't know how to select the whole layer, Ctrl + A only select the whole canvas. I also tried Ctrl + T, but still no way to build a selection of the whole layer.

But there is another option in the Image menu in Photoshop CS6: the Reveal All. Just make sure the layer is highlighted in layer panel, and click Image -> Reveal All

photoshop image menu reveal all fit canvas

And it worked.

photoshop image menu reveal all fit canvas