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?
-
2I 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.– MaxJul 4, 2011 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.– user8709Jul 4, 2011 at 14:53
-
3If you use both at once, is that stereotyping?– glenatronJul 4, 2011 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 MangoldJul 5, 2011 at 11:23
5 Answers
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.
-
+1 the SCM buys you a history which can be invaluable later.– user1249Jul 4, 2011 at 15:31
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.
-
Note that dropbox synchronizes aggressively. Keep an eye on internet traffic.– user1249Jul 4, 2011 at 22:26
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.
-
1
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.
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.