You’re now halfway through your study of how to collaborate with Git. You’ve learned how to clone repositories (git clone) and how to work with remotes (git remote). In the preceding chapter, you created the environment shown in figure 13.1 on your local computer. Cloning and making remotes establishes the groundwork for the next two commands: git push and git pull.
In this chapter, you’ll learn about the git push command, the first half of the Git collaboration process (git pull is the second half, covered in the next chapter). git push is important because it’s how you share (publish) your changes. You’ll see that git push merges those changes with the repository you’re pushing to. This may cause conflicts, and you’ll see how to recover from those. git push operates on your changes in branches, and you’ll see how it does double-duty creating and deleting branches and tags on remotes.
Everything that you’ve done up to now has affected only your local repository. In chapter 12, you learned about the git ls-remote command, which enables you to list the contents of a remote repository. The git push command is the first command that will directly affect another repository besides your own.