It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SourceTree How to create blank remote repo

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.



2 answers

1 accepted

1 vote
Answer accepted

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.

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.

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
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted 11 hours ago in Industry Groups

Upcoming Team Tour Government Symposium in Washington D.C.

Calling all Community members from the Washington D.C. area! Atlassian’s Team Tour is heading to your city to host a Government Symposium on May 1st. Join our team and other government agencies to le...

14 views 0 1
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you