This is a recurring question for me, but I’d like to reiterate.
Quickly explain my situation: I am in an environment where I don’t have a a git server, nor a shared partition or any common point among the coders. Don’t have, will not have, can not have. Period.
I’m trying to come up with a workflow solution, to even in that environment we manage keep our reps at reasonable sync.
The solution I’m trying at the moment uses a discussion group to distribute patches, two main branches and with a seemingly short workflow, follows:
- The branches are
marsterandyours masteris the sync branch, which will keep you up to date and track what other deves still don’t have of your code.yourswill be your new master, and is where your final code should be. You do not work inmaster.- everybody sends patches to the discussion list.
- I’m considering that very rarely two people will work in the same file.
There are two main actions in the workflow:
Generate patches:
- Got to
yours - Generate patches from
master(git format-patch master) - Go to
master - Merge
yoursintomaster - > Go to
yours, continue working withyours
Apply patches:
- Go to
masterbranch - Apply received patches
- Go to
yoursbranch - Merge
masterintoyours - > Continue working with
yours
If I got it right, this should keep a master branch reasonably in sync with everyone else.
Not that the yours branch is only to help in keeping track of what other people have or not.
There are a few problems I’m trying to figure if will be too much hassle:
- Order of patches applied?
- How to avoid and detect when someone misses a patch?
- How much problem can be when someone misses a patch?
- Other problems this can generate I haven’t even thought of?
Thanks!
Instead of having one repo with two branches, I would rather have two repo:
masterbranch in itmasterandyoursThat way I can:
yoursbranch tomasterin the ‘yours‘ repomasterbranch of theyoursrepo into themasterbranch of themasterrepomasterrepo (resulting in one file, easier to communicate)masterrepoOn the receiving end, I would:
masterrepomasterbranch from themasterrepo into themasterbranch of the ‘yours’ repomasterbranch to theyoursbranch.The idea of having two separate repo is to have one with a SHA1 which can be checked on the receiving end: it must be exactly the same in both sites.