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

How to use SourceTree to allow server side repo storage

I created a new repo in my local pc: C:\Temp\RepoDemo which has the .git folder and a text file. What I am trying to do is create a server side folder and have the ability to push my local repo to the server so another user can pull it and either view it or edit and then push it back to the server.

To achieve that I installed SourceTree in my server and created a blank repo. I am trying to push my local repo to the server and I am getting the following error:




The server setup is:



My main goal is to setup a folder in the server1 server to store all repositories created and user can pull/push/commit based on the remote location connected.

2 answers

It sounds like you are trying to push an new repository to an existing remote repository without cloning or checking out from the remote first. That would explain the errors you are getting, which are trying to prevent you from overwriting existing history with commits that are in no way connected to existing commits.

Thanks for the reply. I am pretty much trying to create a new repo in local PC and wanting to push the same repo in the server, so another user from a different machine can download it and make changes and push the changes. Am I doing it wrong? Am I using the wrong product?

The clean way to achieve this is to

  • create an empty repo on the server,
  • clone that to your machine,
  • copy the text file into the clone folder,
  • commit locally and then
  • push the commit to the server.

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 Jan 17, 2019 in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,338 views 12 14
Join discussion

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