Basic git/github Concepts for Newbies

Repository (slang: Repo):

Location on github that stores a snapshot of a project. It includes: snapshots of changes and commits in a history.

Names of Repos:

  • Upstream points to the source projects on github.
  • Origin  points to   the  forked copy in github of the source.
  • Master is the local copy on your development system. So when you work locally, you can merge master with origin/master

Public and Private:

Public repos are visible to anyone, including users who are not logged in to github. Private repos are only available to members of a working team.

Basic Workflow:

  1. Fork a project on githubScreen Shot 2014-03-04 at 2.30.14 PM
  2. Clone your github fork to your computer/local development area (this means you now own two repos: one on github, one on your computer.
  3. Create a topic branch for your own work in your local clone
  4. Commit changes to your github fork
  5. send a pull request back to the original project

About Remotes

In git, other repos that it knows about are called remotes. When you clone a repo, git saves the parent repo under the name origin, so origin on your computer repo will point to your personal fork on github

 

Great Git Learning resources:

 

 

 

Leave a Reply