From the course: Use Git Like a Pro by Pearson

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Push an existing project to GitHub

Push an existing project to GitHub

From the course: Use Git Like a Pro by Pearson

Push an existing project to GitHub

In the previous section we learned how to create a repository on our computer but that repository right now exists only on our local machine. Now what we want is to have that repository on the remote server which is on the GitHub. In order to do that we need to start with the GitHub. we need to create a new repository on the GitHub. The second step is that once you have created the repository, it will give you a URL for the remote repository. Next, you need to tell Git that what is the remote URL. So you need to add the remote using command Git remote, add the name of the remote and the URL, which you have been provided when you created the repository. Once you add the remote, the third step is to push your branch to the remote and that's it, you will have your project hosted on the remote server. Let's see how this looks in practice. Let's go back to our project which is git course. So now, I want to, this is my project. It has File1 and gitignore and bunch of more folders. Now, I…

Contents