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

New remote repository using existing local repository git

Hi all, how are you?. I'm new with sourcetree and I've a doubt, I'm working with a proyect in mplabx then I've created the repository there with no problem so I have my project folder with a .git folder in there. I want to create a remote repository on github to push the local repository that I've previously created but I'm worried about if creating this repository because I don't know if in the Destination Path, when I write the address of the folder where the local repository is, then I don't know if this procedure will erase the content of the local repository folder or it will even recognize the .git folder and others and its content.

 

Can you help me with that?

Creación del nuevo repositorio.png

Here is the image with the remote repository creation window.

1 answer

1 accepted

0 votes
Answer accepted
minnsey Atlassian Team Mar 20, 2019

Hi

That functionality is there to create a new repository from scratch, the local copy and the remote hosted copy.

I believe what you want to do is create a new repository on the host of your choice, e.g. Bitbucket or GitHub etc, then open your local repository in Sourcetree and click the cog in the upper right of the screen to open the repository settings and add a new remote, using the URL from your remote hosted repository

Well, I'm a little bit confused here, so what I need to do is like follows?:

 

  1. Open the local repository in sourcetree. [DONE]
  2. Create the remote repository in the host.
  3. Link the remote repository to the local one by adding the remote one through the cog and adding it?.

 

I'm very new to version control and I don't want to loose my work, thats why I'm asking what to others might seem obvius.

Thank you Michael, your suggestion worked flawlessly.

 

Is there an option to create the remote repository and link it with an existing local one from sourcetree instead of having to create the remote directly at github?

minnsey Atlassian Team Mar 20, 2019

Glad you are back up and running.

If you create a new repository from scratch you can then create the new remote at the same time. But no, there is not currently the ability to create a new remote from an existing repository.

You can request new features at https://jira.atlassian.com

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,907 views 0 12
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you