Git is a distributed version control system. It stores whole objects, not diffs, which is one of the key differences between Git and other version control systems of its time. This speeds up operations like checking out branches and processing commits in batch. Distributed means that while you can have a single source of truth, nothing will break when it goes down, because the whole object database is stored on users' machines, and data integrity is easily verified (commits can also be signed using OpenPGP).


Collaboration with Git is done by sharing patches and pulling from other people's trees. This is how Linux kernel, PostgreSQL, Git and many other communities collaborate. Patches are usually sent by email using git-send-email or formatted separately using git-format-patch. Sending pull requests (using git-request-pull) is preferred when patches get too big and it becomes impractical to send them as a series of emails. A good resource on that is https://git-send-email.io, and u/handlerug recommends it to everyone interested in collaboration via email.

Relatively recently, a new way of collaboration has emerged. GitHub, a centralized freemium hosting platform for Git repositories, launched in April 2008 and quickly eclipsed other services like SourceForge or OSDN and Git frontends like Cgit or Savannah. A huge rise in Git's popularity is also attributed to GitHub's launch. This platform uses pull-requests exclusively to merge trees: one clones a repository to their account (this action is called "forking"), pushes code changes to a new branch, then creates a pull request to the upstream repository using GitHub's web UI. Once everything is sorted out and the code is ready to get merged, upstream's collaborator with push access clicks the "Merge" button (which also offers options to squash or rebase commits). On top of that, this model provides extensive code review capabilities and CI/CD integration.

GitHub's pull requests and the platform have become so popular that nowadays Git and GitHub names are often used interchangeably ("I just pushed some changes to Git", "Do you have a Git account?"), and every developer is expected to have a GitHub account. The merging feature can be sometimes attributed to GitHub instead of Git itself. Various platforms like GitLab instances (FreeDesktop, Alpine, etc) and Gitea instances (Codeberg) exist, but all of them use the same familiar pull-request workflow. SourceHut, a FOSS "hacker forge" platform largely written from scratch and providing many services for developers, launched "in alpha stage" on November 15, 2018, and it uses collaboration by email as the main way of contributing to projects. u/handlerug doesn't know of any other platform that promotes email collaboration (and provides tools for the purpose, such as mailing list hosting and a web UI for sending patches).

That is probably an inherent lazyness of me, for example I passionately hate git and pretty much like mercurial, because the first was created by a dozen hackers to themselves, and nobody really understands it, and nobody else can really use it to its full potentials, and all the documentation and help pages are obscure, complex and generally written from the perspective of someone already knowing the system and being pretty annoyed that have to explain it to anyone else; mercurial on th eother hand has an excellend handbook, good structured help system, easy to use commands which can be very complex if someone take the time and efforts to learn it. And both systems are basically the same, do the same, using the same principles. The difference is the attitude towards the people not yet being fluent in the system.

Also see: https://git-man-page-generator.lokaltog.net/

A platform like Github makes this different, in that it abstracts these tools into a web UI and expect all collaborators to have an account at the platform. The more I learn about ways of collaborating outside of a centralised service like that, the more I've come to dislike them. Decentralised collaboration is a lot more enjoyable and empowering.

Cleaning up the history might seem tedious at first for marginal cosmetic benefits, but it gets much easier and faster with practice. Here I am collecting some tips for cleaning up a git commit history before publishing it to others, for example in the form of a pull request.

Submodules are easier to push but harder to pull – This is because they are pointers to the original repository
Subtrees are easier to pull but harder to push – This is because they are copies of the original repository

git-annex allows managing files with git, without checking the file contents into git. While that may seem paradoxical, it is useful when dealing with files larger than git can currently easily handle, whether due to limitations in memory, time, or disk space.

git-annex is designed for git users who love the command line. For everyone else, the git-annex assistant turns git-annex into an easy to use folder synchroniser.

Собственно, по-хорошему, тут надо начинать с того, что есть целая тема — «системы управления версиями», предназначенные вообще-то для программистов, но я уверена, что пишущим — не менее нужные. Из них я уже который год использую git.

Gitea federation development has reached a crucial milestone: federating with Mastodon!

This is a big deal.