repository - Create Repo on Git and push existing code -


i have git repository (v1) working off, pushing, pulling, merging etc. problem have made bit of mess of repository , need create second (v2). have done through bitbucket, however, need push project working on (local) original repository new repository v2.

when use command git init reinitialises old repo. need start afresh , commit source new repository. me on this. must add wish keep existing repository on bitbucket.

use:

git remote rename origin v1 git remote add origin {{your bitbucket repo address}} git push origin master 

this way keep existing repository default, pushing new commits new one.

edit: if don't need keep local repo history, source code, remove .git catalog, , try git init.


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -