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 online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
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)