this question has answer here:
- how check out remote git branch? 19 answers
the remote repo has branch doesn't exist on local repo. need fetch , start working without merging other branches have. how can it?
you can type:
git fetch <remote>
to fetch refs remote,
git checkout <remote>/<branch>
lets checkout remotes branch "anonymous" branch,
git checkout -b <new_local_branch>
creates local branch based on remote 1 checked out.
you can set remote branch upstream:
git branch --set-upstream-to=<remote/branch> <new_local_branch>
Comments
Post a Comment