Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I currently use a Mac Pro for Xcode development, but am considering buying a MacBook Air when the newer models are released. How should I collaborate with myself when using both machines on the same project? Should I use Git, or should I just acess the Mac Pro as a networked drive from the MacBook, or something else?

share|improve this question
2  
I personally would only consider some VCS like Git, Mercurial, SVN. Working on two machines also forces you to really make sure you have no additional dependencies. –  Max Jul 4 '11 at 14:35
    
I use a repository on a USB flash stick. No reason to avoid some kind of networking solution, but it's a good idea to have extra copies of that repository on local drives - very convenient when the network isn't available. For one-developer-two-machines-plus-flash-stick, even Subversion may be enough, but a DVCS is more practical for anything more complex. –  Steve314 Jul 4 '11 at 14:53
3  
If you use both at once, is that stereotyping? –  glenatron Jul 4 '11 at 15:10
    
Thanks, all. I signed up for an account with GitHub and have pushed my current project. This should allow me to keep both machines current while providing an extra backup as a bonus. –  Michael Mangold Jul 5 '11 at 11:23
add comment

5 Answers

up vote 7 down vote accepted

You should definitely use a SCM system, even when only working on one machine. Which one you use is not that important. I would also recommend keeping the working directories on the two machines separate rather than using a directory shared across the network. Less chance for cluttering your environment, and allows you to work when the network is unavailable or down.

share|improve this answer
    
+1 the SCM buys you a history which can be invaluable later. –  user1249 Jul 4 '11 at 15:31
add comment

I'm not a mac person but I ran into your same situation a while back. I used Mercurial with Dropbox. Basically, I had my repository in Dropbox and had both machines configured to work through that folder. Alternatively, you could use BitBucket or Github to achieve a similar thing.

share|improve this answer
    
Note that dropbox synchronizes aggressively. Keep an eye on internet traffic. –  user1249 Jul 4 '11 at 22:26
add comment

Using SCM is a good practice, it naturally provides for backup in case one machine goes down. Also, it helps in those scenarios where you want to change something in code and test it, but want a clean copy at hand in case it bombs. I have personally used two dev machines to work on two different bugs in parallel. Without the work on either of them affect the other. It is productive.

Also, a UI tip. Working on two machines sitting next to each other is a nightmare for switching keyboards and mice. This utility (synergy-foss.org) lets you use a single pair of keyboard-mouse work seamlessly across multiple machines.

share|improve this answer
1  
+1 for mentioning use synergy also; git probably best choice –  Tim Williscroft Jul 4 '11 at 23:40
add comment

I have to work on the same project from 3 different pcs (and locations). My team and I use SVN and it seems to me the most flexible and clean solution.

Therefore from my experience I would suggest SVN or a similar approach.

share|improve this answer
add comment

You can fudge a sort of source control system using DropBox or similar, or Live Mesh as I did, but ultimately I think you will find that bunging someone $30 a year for basic hosted Subversion or Git will be worth it. If nothing else it'll get backed up, and you'll have forking and access to previous versions and all that good stuff.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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