how to push and pull updates between repositories on the local network?

Hi - this question really shows up my noob status with source control, apoligies if it's been asked and answered before.

I have 2 macs, one laptop and one desktop. Both have SourceTree installed. I've created a Mercurial repo on the laptop to manage an existing project. Then created a matching repo in BitBucket and can push changes to it fine.

I've just cloned the laptop repo to my desktop, which worked fine and I've set up remote access to the same BitBucket project. Push and Pull between the BitBucket repo and the desktop also work fine.

The part I'm having trouble understanding is how to configure the repos in SourceTree so that I can pull changes on the desktop repo directly into the laptop repo likewise, how to pull changes in the laptop repo directly into the desktop repo.

Maybe I'm missing something fundamental here and it's not possible? Any help most appreciated.

1 answer

You can create additional remotes on each machine pointing at the other as a way to sync directly, click on Settings in the top-right of the repo window and click Add. What URL you use to access the other machine depends on what transport you want to use; if the remote machine is available over a file share then you could use file://volume/path/to/repo, otherwise you'll have to set up a server of some kind on the remote machine in order to expose it. Options for that include running 'hg serve' temporarily on the other machine, or possibly setting up an ssh server - for more information, take a look at http://mercurial.selenic.com/wiki/PublishingRepositories

HTH

Thanks for the reply Steve, all sorted using /Volume/path/to/repo.

I was confused by the fact that when creating a new repo from the Bookmarks window, Source Path/URL has GUI buttons for both remote and local souces. The window that opens with Settings > Remote > Add only has a URL button in the GUI.

All working fine now that I know to type the path in manually. Thanks!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
Read article

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