Git workflow when you cannot push or pull

This is a repeating question for me, but I would like to repeat it.

Quickly explain my situation: I am in an environment where I do not have a git server, no shared partition, or any common point among coders. Not have, will not, cannot. Period.

I try to come up with a solution for the workflow, even in the environment in which we work, keeps our representatives in reasonable synchronization.

The solution I'm trying at the moment uses a discussion group to distribute patches, two main branches, and with an apparently short workflow:

  • From marster and yours branches
  • master is a branch of synchronization that will keep you up to date with events and keep track that other devices do not yet have your code.
  • yours will be your new host, and that is where your last code should be. You do not work in master .
  • everyone sends patches to the discussion list.
  • I believe that very rarely two people will work in one file.

There are two main actions in a workflow:

Creating patches:

  • Received yours
  • Creating patches from master ( git format-patch master )
  • Go to master
  • Combine yours in master
  • Go to yours , continue with yours

Apply Patches:

  • Go to master branch
  • Apply received patches
  • Go to yours branch
  • Combine master in yours
  • Keep working with yours

If I understood correctly, this should keep the master branch reasonably in sync with everyone else.

Not that yours branch should only keep track of what other people have.

There are several problems that I am trying to understand if there will be too much trouble:

  • Apply patch order?
  • How to avoid and detect when someone misses a patch?
  • How many problems can there be if someone skips a patch?
  • Other problems that may arise that I didn’t even think about?

Thanks!

+4
source share
1 answer

Instead of a single repo with two branches, I would prefer two repos:

  • one with a master branch in it
  • one (cloned from the first) with master and yours

That way I can:

  • merge what I need from yours branch to master in yours ' repository
  • select changes from yours master repo branch to master master repo branch
  • Make an incremental package from the master repository (as a result you get one file, which is simpler for communication)
  • write this file with SHA1 repo master

On the receiving side, I would:

  • pull from the package to the master repository
  • check its SHA1 (so I'm sure I didn't miss anything)
  • pull the master branch from the master repo to the master branch of the 'yours' repository
  • merge what I need from the master branch to yours branch.

The idea of ​​having two separate repos is to have one with SHA1, which can be checked on the receiving side: it should be exactly the same on both sites.

+2
source

All Articles