Read more

Git: Retrieve a file from a different branch or commit

Tobias Kraze
February 11, 2012Software engineer at makandra GmbH

To access files from another branch or past commit without doing a complete checkout, you can either use

git show branch:file
git show commit:file
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

to display, or check out the file into your working directory with

git checkout branch -- file
git checkout commit -- file
Posted by Tobias Kraze to makandra dev (2012-02-11 01:02)