Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The basics

...

You can think of there being two copies of the repository, one local (on your computer) and the other remote (in the cloud). The local environment has three pieces, your working directory, a staging area and your local repository. You won't see anything except your working directory, which might include files being tracked in the repository as well as other files that you haven't brought into the repository. You can ask git to tell you what files that you have committed to the repository have changed and what files in the directory aren't part of the repository. 

...

After you have committed your changes to the local repository, you still need to push those changes to github for them to be in the remote repository.

If you are keeping a GitHub repository for solo work and accessing the local repository with only one local computer, that might be all you ever need to know. But if you are using the repository to manage files on two computers (e.g. a work desktop and a home desktop) or if you are collaborating, you'll likely need to know a few more commands. Specifically, if two local computers have different versions of the same file, you'll need to learn how to merge. 

Merging

The figure below adds merging and a few other utilities to the basic diagram

Image Added