I have recently added a project as a git project (im new to git and learning) and i was looking at using Bitbucket via Source tree on a mac, but how do i add a locally created project to Bitbucket, as i am using Source Tree but it does not seem to push to my online account do i have to create a repository online first, then clone it then work form within there, or need to some more setting up in order for it to comunicate with Bitbucket
2 Answers
You need to add the BitBucket repo as an upstream remote of your local repository.
After you've created the repo on BitBucket (or Github or wherever...), copy the URL of the remote repository. It should looks something like git@bitbucket.org:your_username/your_repo_name.git
Then to add the repo as a remote from the command line:
git remote add origin git@bitbucket.org:your_username/your_repo_name.git
I'm not sure how you would do it in SourceTree, but if you search the application's help menu for adding a remote, I imagine it must have instructions.
-
thanks for the reply, i found the video posted below earlier that explains this and how to link it up, i cannot mark my answer yet but i have also voted on yours as its a path to the right way, thanks again Jul 8, 2013 at 12:00
Thanks for anyone looking, i managed to trawl through some videos and found this: http://www.youtube.com/watch?v=Hs_Z99nOKM8