I have two branches.
- branch-A
- branch-B
Now, in my machine, I have only checked out branch-B. I need a folder from origin/branch-A without creating a branch in my current repo (actually I am doing an automation)
I tried these.
Try 1:
branch-B $ git restore --source branch-A folder-x
Problem:
It gives error as I haven't created a branch (branch-A) in my local
Try 2:
branch-B $ git fetch `git remote show` && git checkout `git remote show`/branch-B folder-x
This works, but always trying to get all files (from first).
As in my second try, it is always trying to get all files (may be some reset to HEAD of branch-B ).
Is there any way to do update alone for that folder?