DEV Community

Omar Elbaga
Omar Elbaga

Posted on

How to keep all dev files in sync when switching computers constantly?

We have about 100 projects and need to switch from office to home computer without feeling like anything is left behind on another computer. What is your best way to keep all dev files and assets for many projects in sync across 2-3 computers? I realize git is a potential solution. I just don't know if it's the true solution for the situation, unless it is? We have so many assets and projects being worked on. I can't imagine having to remember to commit on every project and if there's a commit left behind, etc.

What are your thoughts fellow devs!

Latest comments (41)

Collapse
 
omarel profile image
Omar Elbaga

Noting here. We ended up going the git route. There really wasn’t any other better way. I do wish there was an easier way to share all the git ignored files however. But overall git was a good solution. The ignored files are just problematic to share on all the projects with other developers.

Collapse
 
nirzaf profile image
Fazrin

Use Yandex Disk, It is damn smooth in Sycing between computers and even with mobiles, Trust me you won't be disappointed, it has a free limitation upto 10GB but it is damn cheap for pro version as well

Collapse
 
alan profile image
Alan

Gitpod.io :)

Collapse
 
blake profile image
Blake K

Have you considered developing on a remote environment/machine (via SSH) instead of your local machines? Visual Studio Code has an amazing plugin for this.

Collapse
 
jerzakm profile image
Martin J

Have you tried AWS S3? It's not ready to go out of the box but you can configure it any way you want. I have a few batch scripts that I use to sync stuff with on a couple of my devices and it works well.

You should be mindful of the pricing with a large number of file transfers and size. It's also a good opportunity to poke around AWS if you haven't had the chance yet. They have a fairly generous free tier.

Collapse
 
sarafian profile image
Alex Sarafian

The most complete solution I've ever seen was one from 15 years ago where my colleague would use a VM as his drv environment. Then he would use s USB stick are his transfer medium.

Collapse
 
omarel profile image
Omar Elbaga

Hmm I do appreciate it. I just feel like that's just not a good reliable real time option, having to constantly move files to a usb. No way I see that being reliable for us :) but appreciate it brother!!

Collapse
 
sarafian profile image
Alex Sarafian

Indeed, it doesn't much our accustomed is expectations.(that is why in mentioned the timeframe :) ) But, there as so many variables to consider that the os encapsulation is probably the only real solution which to be honest is why people use laptops as well.

Collapse
 
gwutama profile image
Galuh Utama • Edited

I wouldn't complicate things with synchronizing hundreds or even thousands of files over sync solutions like dropbox or google drive. In the company I'm working for, using these cloud drives to store files are forbidden (mostly because of GDPR issues). And sometimes synchronizing a lot of small files can take a long time and is less reliable than git.

So my solutions right now are:

  1. Laptops instead of work PCs. Bring the laptops home when you need to work from home.
  2. Remote PC solution with TeamViewer, VNC, Remote Desktop, etc to the office PC from home. Assuming that your internet connection from home is good.
Collapse
 
omarel profile image
Omar Elbaga

Hmm. I definitely appreciate your point of view. We're thinking of laptops, but you know the Team Viewer has always been kind of a hassle and it's not very productive. It's very slow and has other problems. It's good to do a quick thing, but if you really have to actually work through Team Viewer I would completely forget about that as an option.

Collapse
 
filopd profile image
Priyesh Naik

I don't think it's worth to use GDrive/OneDrive for creating workspace.

  1. Keep your office pc locked and not power off and do RDP at home.
  2. Map your workspace with one folder with network sharing and use that instead of RDP.
  3. Add script that automatically commit the code to your custom repo.. check this stackoverflow.com/questions/420143...
Collapse
 
msfjarvis profile image
Harsh Shandilya

For dotfiles I honestly found Git to work best. For OS-level tooling I'm slowly migrating to NixOS as my operating system of choice since it lets me rebuild my PC to an exact previous state with just one configuration file which is amazingly helpful.

Collapse
 
phambatrungthanh profile image
Phạm Bá Trung Thành

For me, it's a combination of private VPS that I can SSH to and VS Code Remote Development.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

How is it different from USB stick / external hard disk?

Collapse
 
phambatrungthanh profile image
Phạm Bá Trung Thành

Well, aside from keeping all your code in one place, you can have your git histories, commits without syncing, and you can run build jobs, run docker containers, deploy codes, forwarding ports to preview code from your local computer. Pretty much anything you can do on your local computer, you can do it on the remote cloud.

Collapse
 
omarel profile image
Omar Elbaga

Yeah would love to hear more about that option! @pacharapol I think it's different because you would leave the VPS connected to a main computer and I assume you could leave it in place and then any other computer could use that VPS remotely as a hard drive "in the cloud" by logging into it.