How to clone a Live site to Bitbucket
I just inherited a site where the former developer has an onsite dev machine (running Ubuntu) and the live site is on Linode VPS. The Git setup is such that when you do git push on the local dev machine, it automatically updates the live server.
There is no repository for this site on Bitbucket. I want to change this, I want to remove the local dev machine out of the equation, I am now using my Windows PC as my development computer and I have created an empty repo at Bitbucket.
My question is how can I pull a copy of this live site to my newly created Bitbucket repo and remove the current dependencies between the live site and the local dev machine. I have looked at the .git/config file in the root of this live site and here is what I see
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "hub"] url = /srv/git/hubs/websitename / fetch = +refs/heads/*:refs/remotes/hub/* [push] default = current
And when I looked at this path url = /srv/git/hubs/websitename / All I see is this
[core] repositoryformatversion = 0 filemode = true bare = true
Should I uninstall git and start over, I read that I should do
git remote set-url origin git://new.url.here
BUt I am not sure what that would do,Any help is appreciated.
I resolved the issue but copying the ssh-key to Bitbucket and then I was able to clone the site to bit bucket. And then I added the newly creatred bitbucket repo as remote on the live site. I used then used the Github for Windows app to clone the bitbucket repo to my local machine and then start working off my machine, committing locally, push to Bitbucket and then from the live site pull from Bitbucket.