Answer the question
In order to leave comments, you need to log in
How to organize the synchronization of a local copy of the code between different machines (between commits)?
We have:
- development and production versions of the project (website), LNAMP;
- one developer, development PC, NetBeans 8, syncable project (local copy, sync on save);
- git repository, under git - only remote copies (dev and production), but not a local copy (by and large, it is used only for deploying changes and monitoring the combat environment for malware);
up to this point everything was fine and convenient, BUT!
- there was a second computer (now in the office), from which sometimes you also want to code;
Task:
- organize code synchronization between these development computers (moreover, synchronization BETWEEN commits... did it at home, did it at work, returned home, finished it, committed it, started a new task, fell asleep, continued at work... and preferably with a minimum overhead for switching between "at home" and "at work");
Which options did NOT fit:
- complete project download before starting work; the most feng shui, but the longest option (for the sake of half an hour of work, wait an hour until it downloads everything, and then another half an hour until the enraged SASS recompiles everything - a stupid occupation);
- Regular NetBins synchronizer; firstly, it is also slow, because one hell of a thing, almost the entire code is first pumped out for verification, and secondly, it often makes mistakes in the direction of synchronization, and you can’t trust it blindly, you still have to check it with your eyes ... as a result, you can meet half an hour, but anyway for the sake of half an hour of work - such a thing;
- the first or second options with manual folder restriction... it helps, but very partially (well, I don't always remember what I changed since the last time I sat at this machine... often the most reliable option is to upload everything, t .k. to make a mistake and then overwrite the remote file with the old local copy - well, you’ll find it later, what’s the problem).
- git built into netbins; because my task is to synchronize exactly BETWEEN commits...
- leave the project remotely, without a local copy; immediately everything becomes sad and slow, especially when you work outside the home on a mobile Internet ... upload-on-save - and it sometimes pisses me off, but this is periodically and tolerable, and if you keep everything there, then the background scan, searches, sadgests etc. - generally plunge into despondency; not to mention the bill for mobile Internet)
What options are still only in my head:
- leave the project synchronized (it's a save). but keep a local copy on google drive / yadisk / dropbox ... pluses: it feels like they can synchronize much better than netbins, besides, they will do it in the background, and by the time I am ready to work - the local copy will already be fresh ... cons: it won't save you from SASS recompilation; security - because all configs, passwords and appearances will be in the cloud, and there it’s not far to issuing Yandex)))
Question:
- in fact, does anyone have experience in solving such a problem? Maybe I'm missing some obvious option?
Thanks in advance for any ideas)
Answer the question
In order to leave comments, you need to log in
Yes, there is an option to learn how to use git and start using it for development, and not for "malware protection"
Flash drive and file manager with synchronization function between directories.
1. Actually, the git is just for this.
Work in a feature branch and push changes before leaving.
2. Slightly overhead, but raise a virtual machine somewhere, install all the necessary software and work exclusively on the virtual machine, connecting to it from anywhere.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question