I am working on a IOS App, and had an existing project on bitbucket. I then downloaded the project, and started working on it, changing a lot of the files. Now, my question is, how do I connect my local project, to the existing bitbucket project? All I can find is creating a new repository, or connecting from an existing, which I'm afraid will overwrite my changes.
EDIT: So I did the following and here is what I get.
git init
git add .
git commit -m "changing stuff"
git remote add origin https.bitbucket.org/myrepository
git push -u origin master
and the error I get is,
hint: Updates were rejected because the remote contains work that you do
not have locally. This is usually caused by another repository pushing
to the same ref. You may want to first integrate the remote changes (e.g., 'git pull ...') before pushing again. See the 'Note about fast-forwards' in 'git push --help' for details.