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

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -