how to get file origin in git code example Example: git origin master some file git checkout origin/master -- path/to/file