Publishing your changes upstream
Now that the Collaborative workflows section has explained various repository setups, 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 to the main development, merging the official version into your repository. This, and the work of the maintainer, is left to be described in Chapter 7, 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 Fig 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, before being able to push yours.
Another possible system with similar workflow is when your...