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

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -