I have the same folder structure relatively on two different machines.
For instance, I have on machine 1: "c:\user\tryer\myprojects\file.cpp"
and on machine 2: "e:\user\tryer\myprojects\file.cpp"
(Note different absolute paths to the same file.)
These two paths refer to the same file of the same project that I sometimes work on from machine 1 and some other time from machine 2.
I synch these two folders over the web via google drive running on both machines independently so that changes to one are automatically synched at the other.
Now, I would like to create a common online source control for this file via github (say http://github.com/tryer/myprojects.git
) so that I can use git on either machine. That is, any update on machine 1 to file.cpp
should be able to be committed to the online repo, and subsequently any other future update to file.cpp
should also be able to be committed to the same common online repo.
From what I have been able to read thus far, while it seems possible to have two different local repositories share the same common online repository, it seems to require to clone afresh from the online repository to machine 2 the initial commit from machine 1, say. But I don't want to do this. I do not want to delete any file or folder locally on any machine, but still have the same online repository that is shared and common and accessible from either machine.
Is there a way to accomplish this? My worry is that if I do the first commit from machine 1, then something with an absolute address for machine 1 or something specific to machine 1 is stored online, and hence creates a conflict later when updating the online repo from machine 2 which has a different absolute address for the same file.