Chapter 7. Creating and Pushing to a Remote Repository
[ 7 ]
Creating and Pushing to a Remote Repository
In the last chapter, we went over choosing which hosting service you want to use, creating an account, and setting up authentication details to securely connect to remote repositories over HTTPS or SSH. In this chapter, we will look at the different ways you can use either local or remote repositories to start working on a Git project and why remote repositories are useful. You will carry out the steps to create a remote repository for the Rainbow project, and you’ll upload some data to it. Additional resources to assist you as you work through this chapter are available in the Learning Git repository (https://github.com/gitlearningjourney/learning-git). |
State of the Local Repository
At the start of this chapter you should have three commits and two branches in your rainbow repository, and you should be on the main branch. The current state of the rainbow repository is illustrated in Visualize it 7-1.
[ Visualize it 7-1 ] |
The rainbow repository at the start of Chapter 7 |
The Two Ways to Start Work on a Git Project
In Chapter 2 you learned that there are two types of repositories: local repositories, which are stored on a computer, and remote repositories, which are hosted on a hosting service. You can start working on a project using Git ...
Get Learning Git now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.