I have very a similar question to this question: https://stackoverflow.com/a/2364223/1716560
I have two branches: uk
and uk-prod
:
git checkout uk-prod
Already on 'uk-prod'
git diff --name-status uk-prod..uk
A pages/Advanced Types.md
A pages/Basic Types.md
A pages/Classes.md
I want to get only file pages/Advanced Types.md
:
git checkout uk -- "page/Advanced Types.md"
But git throw:
error: pathspec 'page/Advanced Types.md' did not match any file(s) known to git.
As far as I understand, it happens because git does not see a local file page/Advanced Types.md
. Yes or not?
For listing, you may use git ls-files to list all files recursively in the current index/working directory. You may refer to Git-SCM Docs / git-ls-files or type man git-ls-files if you have installed Git and have man pages available.
The simple command to PULL from a branch is: git pull 'remote_name' 'branch_name' .
you have a typo - page
instead of pages
:-)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With