8

Because for technical and legal reason the usage of a central repository is for some projects not possible, I would like to set up the versioning with Git in a peer to peer fashion without a catalyzing server. How could this be done?

Raffael
  • 19,547
  • 15
  • 82
  • 160

4 Answers4

3

This would mean sending patches, through for instance email.

See "Git Tip of the Week: Patches by Email"

One way of getting changes is by providing a patch, or a set of changes which can be applied to a remote repository at the other end.

Git started life as a distributed version control system for the Linux project, which actively uses mail lists both as a discussion mechanism and also as a distribution mechanism for patches (changes) for an existing codebase. (New features are just a special case of patching nothing to add the new code.)

Another option is to email a git bundle, which can be incremental.
It is one file, and you can fetch from it.

It is different from a patch.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
3

git daemon might be what you are looking for.

Beware that this mechanism exposes your project to the network as it does not have authentication mechanism.

https://git-scm.com/book/en/v2/Git-on-the-Server-Git-Daemon

nshimiye
  • 144
  • 1
  • 4
2

When Git used in pure DVCS-mode, it's the same (technically) thing, as using in pseudo CVCS-mode

  1. Each side have any possible publishing method, which it can provide (ssh://, git://, http://) in order to be reachable from remote
  2. git clone and|or git remote add establish relations between nodes (1:many)
  3. git pull | git push will transfer changesets between nodes
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
0

In Windows, to open peer-to-peer repo, you could use sharing folder. After activate the folder sharing,

run this command on client side

git clone {\\COMPUTER_NAME\DIRECTORY\REPOSITORY}

when add file or commit changes from remote node, it should work. The thing to be aware is when push to server node. The server node need to switch to other branch before push by other node,

The server command

git branch {NEW_BRANCH_NAME}
git switch {OTHER_BRANCH}

and then client command

git push {CLONED_REPO_DIR}

It limited to only windows user. Happy sharing