Connecting SourceTree to BitBucket and git repo on project server

Steve James April 15, 2015

I am the current sole developer for a volunteer developed/supported content management system used to produce free websites for over 10,000+ Toastmasters public speaking clubs around the world.  I am trying to create a workable development framework that will allow for easily collaborating with additional developers in the future.  As this project has been done strictly with open source tools and volunteer labor to date using a single server (no separate dev server), the code used to be a mess.  I do have multiple revisions of code, but as we have not had any version control to date, everything is currently organized by date coded filenames and folders.

We have installed git on our single AWS server and I have gotten a free 5 person Bitbucket account.  I have SSH and FTP access to the server.

What I would like to set up is having the repository on the server be the master repository and have BitBucket as a backup and for collaboration.  I have installed sourcetree.

I am struggling to get this set up properly.  I think I have the connection between BitBucket and SourceTree set up properly, but I am at a bit of a loss to get SourceTree set up to connect to the repository on our server.   I cannot use http for that as the git repository is not on the http:// path.

Any assistance or insights on how to move forward are greatly appreciated.

2 answers

1 vote
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2015

On the client side of this, it sounds like you are going to want to set up two remotes in SourceTree, Bitbucket and your AWS server. You could also set Bitbucket up as a remote of the AWS server repo, and you can choose which of the two should be the remote for developers, there are advantages both ways.

To get the AWS server working as a remote, check out Chapter 4 of the Git Book, specifically section 4.4: http://git-scm.com/book/en/v2/Git-on-the-Server-Setting-Up-the-Server. Basically, if you use the ssh:// protocol, there is little that needs to be done besides having SSH access.

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2015

The info here may also be useful if you are trying to avoid needing to run any git commands directly on the AWS server: http://stackoverflow.com/questions/7152607/git-force-push-current-working-directory

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2015

On the web page of your repo, there is a clone option:

image2015-4-16 13:7:45.png

This gives you an URL to copy/paste into SourceTree.

 

Steve James April 17, 2015

I think I already have that set up.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events