Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SourceTree How to create blank remote repo

David Shields January 1, 2014

Loving SourceTree, just teaching my devs how to get started with git.

So, we have a number of projects, each of which will have >1 devs and designers. We have a linux box set up as remote repo server, over ssh.

I can create blank repos for them to push into from server command line, no problems at all - just git init --bare in new directory, but is there a way to do this from within SourceTree rather than at command line ? I can get devs to define a remote as ssh://<user>@<ip>:/repo/<reponame> but I cannot see how to create the bare remote for a push.

Regards

David

2 answers

1 accepted

1 vote
Answer accepted
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.
January 1, 2014

This isn't probably the answer you want to hear, but I don't believe that git provides a way to create repositories remotely. I think you'll have to create the repository via command line on the remote server. This only sounds like it would be a significant problem if your devs plan on creating new repositories on a regular basis.

David Shields January 7, 2014

Ah well, it was worth a shot. I know the native git gui can do it when you first create a remote config, but git gui's shortcomings in other areas (like no pull, just fetch) make it not viable for my devs at the minute. I'll stick to the command line, and maybe set up a bash script to help.

0 votes
Aseem Parikh
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.
January 1, 2014

If I'm understanding you correctly, you want your devs to be able to create new repos from within the comfort of SourceTree on Windows without having to SSH to your remote repo server and running a 'git init --bare'?

I'd suggest going with BitBucket or Stash first of all, but if you have a need to host your own repo server then read on.

SourceTree can't really help you here (sorry, you probably don't want to hear that). However, you can create your own batch script to make the process a little easier for your team. This batch script would take 1 param: repo name. Inside the script, you'd run need to run a 'git init --bare', preferably in a temp directory, and scp (or pscp) that to your repo server. Once the copy is complete, your dev/designer can clone the repo and get started.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events