git - On a new machine, how do I fetch an existing branch? -
i'm not new git, i'm not gitmaster.
i have existing branch on git account, pull, when :
git checkout previously_created_branch
i get..
error: pathspec 'previously_created_branch' did not match file(s) known git.
anyone know how accomplish this?
git must know want branch
first fetch changes remote repository:
git fetch origin
then can check out with
git checkout -t origin/previously_created_branch
this create local branch of same name, tracks remote branch
Comments
Post a Comment