Basic git/github Concepts for Newbies

Basic git/github Concepts for Newbies

Screen Shot 2013-06-04 at 7.32.25 PM(I am posting this mostly to review key concepts discussed on evening of May 29, 2013). This is a crosspost with RubyGirlsonRails)

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 github
  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

 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top