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

Create new remote repository using existing local repository

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

Hi @Valery Ramirez. You need to set your destination path and you could be calm about the stability of this process. Adding of the new remote will not affect your code and will not erase your project. It'll be new remote repository URL and that's all. You can decide which remote you want to use any moment.


Alternative way to add remote via Terminal:

  1. cd /path/to/your/project

  2. git remote add origin https://path_to_your_repo

  3. git push -u origin master

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Training & Certification

Announcing new Jira and Confluence Cloud training 🙌☁️

Four new Atlassian University courses to get your teams up-to-speed in Jira and Confluence Cloud Whether you’re migrating to Cloud, scaling up your teams, or just been waiting for more help on-boar...

230 views 4 14
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