Git: How to copy bitbucket master to a local branch? -
i want copy master of bitbucket branch in local machine. master of local machine different code , don't want change reasons. should first checkout in local branch , git pull remote master
? right?
you can fetch , checkout remote tracking branch under different name:
git remote add bitbucket /url/of/bitbucket/repo git fetch bitbucket git checkout -b anewbranch --track bitbucket/master
that way, local master
untouched, , have bitbucket master
checked out in own local branch.
Comments
Post a Comment