Git restore file from commit by commit HASH

Restoring a file from a certain commit relative to the given commit by Git CLI

3

Votes

git checkout <COMMIT_HASH>~<NUMBER> -- <RELATIVE_PATH_TO_FILE>

Vote Here

You must earn at least 1 vote on your snippets to be allowed to vote

Terms Of Use

Privacy Policy

Featured snippets are MIT license

Gears & Masters

Advertise

DevOpsnipp.com © 2020

medium.png