Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Feriscool

macrumors newbie
Original poster
Jan 28, 2014
4
0
I've been using my home PC to do web dev for the past few months. I've been using BitBucket to save my updates (including mySQL databases).

I just picked up a new Macbook Pro and have been trying to figure out how to keep both machines, the Mac and the PC, up to date with the latest files.

Does anyone here know how I can work between a Mac and a PC and keep all of my files - mySQL databases and website files - up to date?

Thanks! :)
 
Have all the files on an external drive -- that's what I do...

That's one way, but not really how I'd want to work. I like using git so that I can review my changes/updates. Is there any way to keep using git and have it work on Mac?
 
That's one way, but not really how I'd want to work. I like using git so that I can review my changes/updates. Is there any way to keep using git and have it work on Mac?

Host your files on github or similar? Or get a cheap NAS (they're as cheap as $150 new for a good one if you're in the US) and host your git repository on that?

I work on PCs and Macs as well but don't do development any more, so just stick with a combination of Dropbox, Evernote, Google Drive and other cloud-based services like iTunes Match. In general I think moving your files to the cloud is the way ahead; I live in an apartment and don't need/want loads of electronics lying around like I used to.
 
Last edited:
That's one way, but not really how I'd want to work. I like using git so that I can review my changes/updates. Is there any way to keep using git and have it work on Mac?

Sigh, should have done my research before answering (hadn't heard of bitbucket). Since you're already using a github-like service, I guess you're specifically talking about your MySQL database being in sync. In that case I'd again suggest a cheap NAS, particularly if your database is large. If you need to work out of the home you can take a cheap NAS (which are usually quite small) with you easily.

If it's small enough you could actually host it on Dropbox, but most of the time I wouldn't recommend it. See http://churchm.ag/configuring-dropbox-apache-php-and-mysql-for-a-development-environment/ for a good example of what can be done and what should not be done.

Or if you want to keep it all online, you could use a web hosting provider that offers MySQL, but you'll give up a lot of control over the database instance. For full control you can co-locate but that's usually quite expensive.
 
Does anyone here know how I can work between a Mac and a PC and keep all of my files - mySQL databases and website files - up to date?

Keep the current version of all the files on just one machine (apart from backups, of course), and use file sharing to access them from the other.

So if you want to work 'on the move' you'd want the 'master' files on your MacBook and, when at home, access the files from your PC via your home network.

As for MySQL databases, any MySQL client/library will happily talk to a MySQL server running on a different machine. No point in running two instances of MySQL. If, for some reason, you do need to keep two MySQL servers in sync, go google 'MySQL Replication'.

Pretty sure you can set up your own private Git repository on a Mac, too.

For maintaining 'mirrors' of files, 'rsync' is a useful tool, but its command-line based, so there's a learning curve. Ultimately, though, you can use it to create a script that will sync directories between two machines.
 
Sigh, should have done my research before answering (hadn't heard of bitbucket). Since you're already using a github-like service, I guess you're specifically talking about your MySQL database being in sync. In that case I'd again suggest a cheap NAS, particularly if your database is large. If you need to work out of the home you can take a cheap NAS (which are usually quite small) with you easily.

If it's small enough you could actually host it on Dropbox, but most of the time I wouldn't recommend it. See http://churchm.ag/configuring-dropbox-apache-php-and-mysql-for-a-development-environment/ for a good example of what can be done and what should not be done.

Or if you want to keep it all online, you could use a web hosting provider that offers MySQL, but you'll give up a lot of control over the database instance. For full control you can co-locate but that's usually quite expensive.

Thanks, I'll give this a shot.

I was actually thinking that I could have a repository on Bitbucket for the website files and the database, however, when I pulled the updates on my Mac, the website files worked fine, but I couldn't start the MySQL server in the XAMPP control panel because there was something wrong with the database (even though it worked fine on my PC).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.