1

I'm not an expert on git.

I have a git repository (created by Xcode on my hard drive) that I commit my project to every time I make any changes or add new functionality. What I would like to do is create an exact copy of this repository on my Dropbox folder so that if something was to happen to my hard drive I would have a backup of it on Dropbox. I won't be saving from other computers on to the repository on the Dropbox, all I want is when I commit to my original repository it also commits to the back up one on the Dropbox as well.

1

2 Answers 2

0

Does something like this seem like what you are looking for?

4
  • If you think a question is a duplicate, rather than add a link to a question which has been answered, please vote to close it as a duplicate instead.
    – Abizern
    Jan 25, 2012 at 15:46
  • @jamesTheProgrammer: That's right.
    – Andriy M
    Jan 25, 2012 at 17:00
  • I saw that question before I posted but it didn't really help me. It doesn't show me how to copy my other repository to the one in the dropbox and if they can be synced somehow
    – Mike Khan
    Jan 25, 2012 at 20:05
  • I think the key is in the last two lines of the code sample. The Dropbox folder is set up as the 'origin' repository. So after you perform a commit on your code, you follow that command with a 'push' (basically a copy, in this case) to the 'origin' repo (your Dropbox folder). Then Dropbox takes care of the rest. Jan 25, 2012 at 20:15
0

I stumbled on to this from a google search, so I'm sorry for resurrecting this post, but I feel like I can possibly help.

I think the real problem here is that Mike Khan doesn't really clearly ask his question... but I'm going to give it a shot.

Xcode saves the git repository in a hidden folder called .git, this folder resides in the same location as the .xcodeproj file for your project. So, you'll have to enable viewing hidden folders to copy or view it like you asked.

I started using dropbox to backup my repo as well as my project files. I guess it'd be ideal to only sync the .git folder and not the other files... not sure how to do that with dropbox yet.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.