Skip to content

Getting Started With Git and Github

Anthony Christe edited this page Aug 15, 2013 · 4 revisions

Introduction

Have you ever been in a situation where you need to copy your code from one compute or another? Have you ever found yourself creating multiple versions of a source file (HelloWorld.java, HelloWorld.java.old, HelloWorld_v1.java, WorkingHelloWorld.java, etc)? Have you ever attempted to work on the same project with multiple people? Did you just pass zip folders back and forth to each other? What happens when one of the members on your team overwrites part of your code or introduces a bug?

If you've ever experienced any of the above, maybe you need git in your life.

git is a distributed version control and source code management (SCM) system. It allows you to keep track of changes in documents (mainly source code, but other documents as well), revert to old versions of a project, and easily share your project along with all revisions with others.

In this lab, we will be using git and github to share lab notes and source code with each other.

Getting Started with Git and Github

Read the following guides.

Using git to obtain, edit, and improve ICS 211 notes

We'll be using git in order to get a copy of the ICS 211 lab notes as well for source code sharing.

Basic Workflow
  • Make sure you have an account on github.
  • Fork the [ics211f13].(https://github.com/anthonyjchriste/ics211f13) repository.
  • Clone a local copy from your version of the forked repository.
  • Add a remote to my upstream master branch.
  • Make changes to your local copy.
  • Add (stage) the changes to committed.
  • Commit the changes.
  • Push the changes back to git hub.
  • Send me a pull request.
  • Finally, if I approve the pull request, the changes will be merged back into my master branch.

Basic Workflow Screencast

Clone this wiki locally