Publishing your changes upstream
The Collaborative workflows section in Chapter 6, Collaborative Development with Git explained various repository setups. Here, we’ll learn about a few common patterns for contributing to a project. We’ll see what our main options for publishing changes are.
Before starting work on new changes, you should usually sync with the main development, incorporating the official version into your repository. This, and the work of the maintainer, is left to be described in Chapter 9, Merging Changes Together.
Pushing to a public repository
In a centralized workflow, publishing your changes consists simply of pushing them to the central server, as shown in Figure 6.2. Because you share this central repository with other developers, it can happen that somebody has already pushed to the branch you are trying to update (the non-fast-forward case). In this scenario, you need to pull (fetch and merge, or fetch and rebase) others’ changes...