Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

checkout remote file different name

# Checkout File from previous Commit
git show HEAD^:./your-file > a-different-name-for-your-file
git show a-previous-commit-sha^:./your-file > a-different-name-for-your-file

git show remotes/origin/master^:./your-file > a-different-name-for-your-file
git show remotes/origin/a-branch-name^:./your-file > a-different-name-for-your-file
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #checkout #remote #file
ADD COMMENT
Topic
Name
2+8 =