Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,466,749
Community Members
 
Community Events
176
Community Groups

Easy way to keep a copy of my repo on a USB?

Is there any easy way to keep a copy of my repo on a USB by using Sourcetree + Mercurial + Bitbucket?

I mean having a everything synchronized with my local working directory and my remote repository at Bitbucket or Github?

Here some people explains how to do it with git commands

https://stackoverflow.com/questions/38153478/copying-a-git-repository-to-usb-drive

But I'd like to get it from the Sourcetree GUI, and I'm using Mercurial at Bitbucket, though a Git solution would also be nice..

 

I'm using repository to keep a copy of a project I'm doing for my PhD. And I work both from the university and home.  But sometimes I don't have Internet at home and I need to rely on a USB.

4 answers

Then I will end up having two repos, one on my pendrive and another one on my hard disk and every day I will need to push the content of any of them to bitbucket and later pull it back to the other repo (for example disk -> bitbucket -> usb), isn't it?

Maybe I can do it by cloning the repository to my USB.

https://confluence.atlassian.com/bitbucket/clone-a-repository-223217891.html

But I can't find the "Clone" option on Sourcetree.

Where is it?

Hola Juan! 

If you have your repo locally in your machine, you don't need to clone it (a clone would be a copy from the remote repository if it was hosted in Bitbucket for example), you can import it into Sourcetree using the menu on top: File > New > Add existing local repository and navigate to the directory where your repo is. 

Could you do it?

Saludos,

Ana

I named Git just as an example and possible alternative but I'm really interested on a Mercurial solution.

The truth is that I know very little about all these tools. I've decided to use Mercurial through SourceTree because it's more comfortable than the command line.

And yes, manually copying the folder every day is what I was trying to avoid. I'd like to keep everything synched on Bitbucket and my USB by just pressing the "Pull" option on SourceTree.

 

Muchas gracias Ana.

0 votes
Ana Retamal Atlassian Team Dec 06, 2018

 

Hi Juan, welcome to the Community!

First of all, let me say this is not a question about Bitbucket or Sourcetree, more about Mercurial, but let me try to help anyway.

If you're already using Bitbucket, Github, and Sourcetree and have copies of your repo in all the three of them, you'll be able to always have them in sync. Getting a copy of your repository in your USB drive is as simple as copy-pasting the whole directory into it.

The article you linked is doing something different because it's not just keeping a copy of the repo, is adding it as a remote, which I believe would work better in your case. If you'd like to do that, you'll need to use Mercurial commands (not Git) and I recommend you check their documentation at https://www.mercurial-scm.org/wiki/QuickStart. You won't be able to do that from Sourcetree, you'll need to use the terminal, though. Is there any reason why you'd want to use Sourcetree for that?

Is there a reason why you'd want to use Git too? Mercurial and Git are different systems, and you'd need to convert from one to the other, or you could use this plugin to collaborate to the same repo using both systems.

Hope that clarifies some things, Juan. Let us know if you have any questions!

Cheers,

Ana

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events