Of course, there is the benefit of a VCS built on the idea of decentralization: not having to be online to make commits (cough SVN cough). But, in theory, could a centralized system work in “offline mode” like Git?
Of course, there is the benefit of a VCS built on the idea of decentralization: not having to be online to make commits (cough SVN cough). But, in theory, could a centralized system work in “offline mode” like Git?
The key point about git is that every copy of the repository is semantically equivalent to every other copy. The one on your local machine is a fully fledged repo just like the one on your colleague's machine and just like the one on github or wherever else a "canonical repo" is hosted.
This is utterly different from older systems like svn or perforce, where the "central server" is semantically distinct from whatever you have on your machine.
At any time, you could decide that a different instance of the repo is canonical (shared push/pull), and that's what make git decentralized.
Git is a _distributed_ version control system, not a decentralized version control system. This simply means that users of the repository download the entire repository onto the machine they are making changes from. Distributed version control systems have no opinions on whether the source of truth for a given repository is decentralized, distributed, or centralized.
But, one relatively decentralized workflow that git has good support for is sending patches via email (git format-patch, git am). I believe the Linux kernel still does a large amount of its collaboration that way.
https://github.com/FFmpeg/FFmpeg/pull/153#issuecomment-15416...
That's one way of doing it. There are others as well.
https://git-scm.com/book/en/v2/Distributed-Git-Distributed-W...
You clone a maintainers personal tree (which can be anywhere), make the change, and email them the patch with git send-email. They then apply it with git am -3. Trusted maintainers might tell another maintainer to pull their tree from wherever they put it, but they can place it wherever in the moment, including just on their own machine - it only needs to work for a single fetch as well, and could be a new location every time.
Yes. Instead of github.com/username/project people host git repos on their own machines.
That is exactly how Linus designed it to be used, and how it was used in the early days.