DEV Community

Discussion on: Syncing my "htdocs"-folder between two computers?

Collapse
 
vdsmartin profile image
Martin Vandersteen

Why not just use git ?

Collapse
 
okayfrederick profile image
fred321f

Well.. I looked into this, but I didn't feel like it was the right solution..

With git, is it possible for me to just pull the code I pushed from my other computer, into my XAMPP or apache directory? And does it replace the folder, or just copy from Git repo and into the directory?

Collapse
 
vdsmartin profile image
Martin Vandersteen

Git was made for this + collaboration. Basically each project you have should be a git repository. You can then push/pull changes from those repositories and everything will be synced. It doesn't replace the folder, it just applies changes fetched from git to the files that changed. Nothing else.

There is really no reason not to use git nowadays !

Collapse
 
sroehrl profile image
neoan • Edited

Even better: GIT will be the fastest solution as it only updates changes rather than the complete project. Additionally, you have a unified history so you can roll back changes regardless of which computer you used. Start simple and you will see that it's perfect. Soon you'll jump into branching and other features that will make you join the millions of devs that wouldn't live without it anymore