this is my problem. I have a project in visual studio linked to a remote repository on bitbucket and I'm working on it with other people. I'd like to make a copy of this project to work on it alone and I want that changes I make on this copy do NOT apply on the original project. I want the new copy have another project name and to NOT be linket to that remote repository. I tried with File -> Save as, but when i work on it, it still is linked to the repo and when I enter the directory in which it is I don't see any .git files to remove to resolve the problem.
Here are the steps that you need to follow:
Create a remote repository on Bitbucket. Add that repository host in your existing local repository:
`git remote add new-origin remote_repository_url`
Check if it is added or not. Below given command will list all the remotes associated with this repository:
`git remote -v`
Now (if required) you can remove your previous remote repository host by following command:
`git remote remove origin`
That's all. Now you can push any of your branch to your new repository by: git push new-origin branch_name
And believe me, removing .git
directory is not a solution as you will loose all your version history. ;)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.