Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bitbucket: Adding a local built project to bitbucket using a Mac OSX

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

like image 706
Simon Davies Avatar asked Jul 08 '13 10:07

Simon Davies


People also ask

How do I add a project to Bitbucket from Xcode?

Open Xcode's Account preferences by choosing Xcode > Preferences and clicking the Accounts button in the preference window's toolbar. Click the Add button to add an account. Choose GitHub to add a GitHub account, Bitbucket Cloud to add a Bitbucket account, and GitLab.com to add a GitLab account.


1 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 [email protected]:your_username/your_repo_name.git

Then to add the repo as a remote from the command line:

git remote add origin [email protected]: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.

like image 64
founddrama Avatar answered Sep 26 '22 03:09

founddrama