git checkout file from master
git checkout origin/master -- path/to/file
git checkout file from master
git checkout origin/master -- path/to/file
git checkout specific file types
# You don't need find or sed, you can use wildcards as git understands them (doesn't depend on your shell):
git checkout -- "*.xml"
# The quotes will prevent your shell to expand the command to only files in the current directory before its execution.
# You can also disable shell glob expansion (with bash) :
set -f
git checkout -- *.xml
# This, of course, will irremediably erase your changes!
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us