

A README.md file shows up the Git project page and helps people understand what the project is about. This time, we want to create a README.md file. Let’s say we make a change to our repository. If you look at the files, you’ll notice that the files are exactly the same as the files you have on your computer. Git repository page updated with the files you pushed Refresh this page and you’ll see what you’ll usually see on Github (a project page). You can verify this is true if you go back to the page where you got the Git remote URL from. When these two tags are on the same commit, it means the files we have on our local master branch is the same as the files we have on Github’s master branch. In this case, our origin is Github, so origin/master refers to the master branch on Github. And the other is called origin/master (the master branch on the remote named origin). One is called master (the master branch on our computer). (In other Git clients, that will be Git History). Once it is pushed, you can look at the All Commits section. Once that is checked, you can click push and Fork will push your project onto Github. For now, just remember you need to create a tracking reference. We’ll talk about branching in a later lesson. Note: if branching sounds foreign to you right now, don’t worry about it. If you don’t create a tracking reference, you will need to specify which branch to push to (or pull from) every time. When you push your files onto the remote for the first time, make sure the create tracking reference checkbox is checked.Ī tracking reference tells Git to track the current branch (master in this case) and to push or pull to the same branch on the remote. The repository URL should be the URL you copied from Github. If you have multiple remotes, you will want to rename the remote according to where they are from (like Github, Heroku, and Bitbucket). The default name for most remotes will be origin. To add the remote, click on the select box and select add remote. We need to add the remote we just created. In this case, our branch will be master (because we only have one branch). Once you click on the push button, Fork will ask you to select a branch and a remote to push to. It looks like an arrow that goes upwards. Next, open the project in Fork and click the Push button.
#Git add remote password#
SSH lets you push (put things into the remote repository) and pull (copy the remote back to your local) without entering your Github username and password every time. Linking the local repository to the remote repository
#Git add remote how to#
You’re going to learn how to do them in a few lessons.įor now, we want to link up our local repository in Fork to the remote repository we just created. This knowledge requires you to use the Git command line. Once you click on create repository, you’ll come to a page with some Git instructions. Then, ignore the rest and click on the create repository button. Set the project to public or private, depending on what you want. The description is for you to describe your project in a line so other people can understand what your project is about. To create a new repository, you need to give your repository a name.
#Git add remote plus#
Click on this plus button and select new repository. Once you sign in, you’ll see a plus (+) button on the right-hand corner of the page. Create an account if you don’t have one already.

The other services follow the same instructions. This article shows you how to set up a remote on Github. If you want to create a private repository on Github, you need to pay $7 a month. If you want to create private repositories, you might want to consider Bitbucket or Gitlab because they let you create private repositories for free. A private repository is a Git repository that can only be read by you and people you give permission to. Sometimes you may want to create private repositories. (Note: open source projects can also be hosted on Bitbucket and Gitlab as well). This is also why most open source projects are hosted on Github. Many people like to use Github because Github is the most popular one out of the three.

The only differences between the services are their popularity, their web interface, and their pricing. There are no differences between these three services when Git itself is concerned. If your computer crashes, you can always get the latest version from the remote back onto your computer.īefore we talk about Git remotes, we have to talk about different services that provide you with Git remotes. In Git terminology, we call the Git repository on your computer a local repository.Ī Git remote is the same repository stored somewhere else on the internet. Note: This the third video in the Git for beginners series.
