Reputation: 409
I have a branch "tree" in my testing repository.
Now i want to move that branch to a new repository "react-tree-component" as the brand new master branch,
Testing > tree
MOVE TO
react-tree-component > master
Use Case : I have a testing repo in which I treat as rough work..but sometime the work turns out to be useful and can be a starting point of another project deserving its own repo....therefore need this
how can i do this?
Upvotes: 4
Views: 3163
Reputation: 1654
You first need to add the new "target" remote:
git remote add react-tree-component <url>
And then push with rename:
git push -u react-tree-component tree:master
Upvotes: 4