Intro to GitHub (Activity)

From Foss2Serve
(Difference between revisions)
Jump to: navigation, search
(Background)
(Fix link)
 
(38 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Git Warm-Up ==
+
__NOTOC__
=== Preparation: ===
+
  
{| border="1"
+
{{Learning Activity Overview
|-
+
|title=
|'''Description''' ||
+
Intro to GitHub
This activity will help you get started with Git. You will work on a
+
|overview=
remote repository shared by other workshop attendees.
+
Learner will get started with Git by working on a remote repository shared by other workshop learners.
|-
+
|prerequisites=
|'''Source''' ||?
+
* A basic understanding of command-line usage would be helpful, but not required.
|-
+
|objectives=
|'''Prerequisite Knowledge''' || A rudimentary understanding of command-line usage would be helpful, but not required.
+
|-
+
|'''Estimated Time to Completion''' || 30-60 minutes
+
|-
+
|'''Learning Objectives''' ||Upon completion, you will be able to
+
 
* Install Git.
 
* Install Git.
 
* Configure Git.
 
* Configure Git.
* Clone a remote repository.
+
* Fork a GitHub repository.
* Make changes to a local copy.
+
* Make changes to a repository.
* Commit changes to a local copy.
+
* Commit changes to a GitHub repository.
* Push changes to a remote repository.
+
|process skills=
|-
+
}}
|'''Materials/Environment''' ||
+
* Access to Internet/Web and web browser
+
* Computer with install privilege <Not sure what this is or how to get it.>
+
* A password from facilitator to access repository
+
* (For facilitator) a server with a git repository
+
|-
+
|'''Additional Information''' ||
+
* Git website: http://git-scm.com
+
* Repository location: openfe@stoney.zapto.org:sandbox.git
+
|-
+
|'''Rights''' || Licensed CC BY-SA (?)
+
|-
+
|'''Turn In''' || New git repository with your name containing all changes.
+
|}
+
  
== Background ==
+
=== Background ===
  
Before diving into the activity below, let's explore some of the great resources that are available for learning Git. Most of these are linked to from the official Git website:
+
For the impatient, you may skip down to the [Directions] section and get started. If you would prefer an overview of Git first, there are some great introductory videos on Git's site: http://git-scm.com/ . Namely:
 
+
The Git Website - http://git-scm.com/
+
 
+
In particular there are some nice introductory videos on that site. You can navigate to Documentation and then Videos. Here is a brief synopsis of each video.
+
  
 
* Git Basics: What is Version Control?<br/><br/>If you are new to version control, or just want to gain a deeper understanding of it, this is 6 minutes of your life well spent.<br/><br/>[http://git-scm.com/video/what-is-version-control Watch the video]<br/><br/>
 
* Git Basics: What is Version Control?<br/><br/>If you are new to version control, or just want to gain a deeper understanding of it, this is 6 minutes of your life well spent.<br/><br/>[http://git-scm.com/video/what-is-version-control Watch the video]<br/><br/>
Line 53: Line 29:
 
* Git Basics: Quick Wins with Git<br/><br/>Still not convinced?  Need more reasons to use Git?  Whether you are gearing up for a water cooler debate about version control systems, or you just want to get a better understanding of the Git philosophy and the features that implement those philosophies, this 5 minute delivers.<br/><br/>[http://git-scm.com/video/quick-wins Watch the video]<br/><br/>
 
* Git Basics: Quick Wins with Git<br/><br/>Still not convinced?  Need more reasons to use Git?  Whether you are gearing up for a water cooler debate about version control systems, or you just want to get a better understanding of the Git philosophy and the features that implement those philosophies, this 5 minute delivers.<br/><br/>[http://git-scm.com/video/quick-wins Watch the video]<br/><br/>
  
=== Getting Help ===
+
=== Directions ===
* The Git website: http://git-scm.com
+
* The help command:
+
$ git help
+
* The git status command gives useful suggestions. Use often.
+
$ git status
+
=== Commands to Inspect Your Repository ===
+
While you are completing the activities below, the following commands
+
may come in handy. These commands do not change the state of your repository so they are always safe to use. Use them often.
+
* Status command: reports status of repository and gives suggestions!
+
$ git status
+
* Log command: reports history of commits.
+
$ git log
+
* Diff command: displays detailed differences since last commit.
+
$ git diff
+
  
== Directions ==
+
1. Git: Download, install, and configure git as demonstrated in the videos above.
=== Part 1: Install and Configure Git ===
+
2. GitHub: Go to https://github.com/foss2serve/github-rollcall-activity and follow the instructions there.
1.  Download and install Git for your operating system from http://git-scm.com.
+
2.  Start a shell/terminal (windows: right-click desktop and select 'Git Bash')
+
3.  Configure Git with your identity (replace caps with your information):
+
$ git config --global user.name 'YOUR NAME'
+
$ git config --global user.email 'YOUR@EMAIL'
+
=== Part 2: Roll-Call Activity ===
+
1.  Clone the following repository to your local system (password needed).
+
$ git clone openfe@stoney.zapto.org:sandbox.git
+
2. Change into the sandbox directory.
+
$ cd sandbox
+
3.  Using any tools you like, inside the sandbox directory create a file named YOUR_NAME.txt (e.g., jane_smith.txt). with your bio.  Using your favorite text editor, write your bio in the file (don't forget to save).
+
4.  Select the changes you want to commit: your new file. (The following command should be issued in the sandbox directory. So if you have changed directories since step 2, please return to the sandbox directory before issuing the following command.)
+
$ git add stoney_jackson.txt
+
5.  Commit selected changes to your local repository.
+
$ git commit -m'Added bio for Stoney Jackson.'
+
6.  Push changes from your local repository to the remote repository (password needed).
+
$ git push
+
If git reports something like the following, you may continue to part 3:
+
<nowiki>
+
Counting objects: 5, done.
+
Writing objects: 100% (3/3), 245 bytes, done.
+
Total 3 (delta 0), reused 0 (delta 0)
+
To /Users/Stoney/Desktop/t/a.git/
+
  5dd2c29..7232044  master -> master
+
</nowiki>
+
  
If git reports something like the following, continue to the next step:
+
=== Additional Information ===
<nowiki>
+
To ...
+
! [rejected]        master -> master (non-fast-forward)
+
error: failed to push some refs to '...'
+
hint: Updates were rejected because the tip of your current branch is behind
+
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
+
hint: before pushing again.
+
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
+
</nowiki>
+
  
7. Pull changes from remote into your local repository. (This may invoke a text editor requesting a message explaining the necessity of the merge. Just save the default message and exit the editor.)
+
* Git website: http://git-scm.com
$ git pull
+
* Repository location: https://github.com/foss2serve/github-rollcall-activity/
Return to step 6, and try to push your changes again.
+
  
=== Part 3: Follow up ===
+
=== Deliverables ===
  
''' Congratulations, you have successfully contributed to a shared, remote repository! '''
+
POSSE: Correctly completing the activity on GitHub will add you to the POSSE roll call list on GitHub.
  
Additional activities to give you more practice with Git.
+
= Notes for Instructors =
*  Issue a pull command every couple of days, and see if anyone else has posted a bio, or updated an existing bio.
+
*  Update your bio. Follow steps 6-11 as necessary to commit your changes to your local repository and then push them to the shared, remote repository.
+
*  Delete your local repository and clone a new one. Confirm your changes have persisted.
+
*  Add a subdirectory with your name as its name, and add some new files inside.
+
  
== Identifier ==
+
The remaining sections of this document are intended for the instructor.  They are not part of the learning activity that would be given to students.
URL to module or material
+
 
== Source ==
+
=== Assessment ===
Description of original source and/or link if present.
+
 
== Subject ==
+
* How will the activity be graded?
Use Computing Ontology or ACM Classification System if possible
+
* How will learning will be measured?
== Education Level ==
+
* Include sample assessment questions/rubrics.
Anyone
+
 
== Audience ==
+
{| border="1" class="wikitable"
Educator or Learner (both)
+
! Criteria
== Contributor ==
+
! Level 1 (fail)
person who posts the activity
+
! Level 2 (pass)
== Publisher ==
+
! Level 3 (good)
foss2serve
+
! Level 4 (exceptional)
== Language ==
+
|-
English
+
| '''Criteria 1'''
== Rights ==
+
|
TBD - probably CC BY 3.0
+
|
== Format ==
+
|
text/html
+
|
== Creator ==
+
 
 +
|-
 +
| '''Criteria 2'''
 +
|
 +
|
 +
|
 +
|
 +
 
 +
|}
 +
 
 +
=== Comments ===
 +
 
 +
* What should the instructor know before using this activity?
 +
* What are some likely difficulties that an instructor may encounter using this activity?
 +
 
 +
{{Learning Activity Info
 +
|acm unit=
 +
|acm topic=
 +
|difficulty=
 +
Easy
 +
|time=
 +
30-60 minutes
 +
|environment=
 +
Access to Internet/Web and web browser.
 +
|author=
 
Stoney Jackson
 
Stoney Jackson
== Date Created ==
+
|source=
2/18/2013
+
None
== Date Last Modified ==
+
|license=
2/18/2013
+
{{License CC BY SA}}
 +
}}
 +
 
 +
 
 +
=== Suggestions for Open Source Community ===
 +
 
 +
Suggestions for an open source community member who is working in conjunction with the instructor.
  
  
[[Category: Foss2serve]]
+
[[Category:Learning Activity]]
[[Category: Learning_Activity]]
+
[[Category:Communication and Tools]]
 +
[[Category:Git]]
 +
[[Category:CS Principles]]
 +
[[Category:CS1]]
 +
[[Category:CS2]]
 +
[[Category:Good Draft]]

Latest revision as of 13:28, 31 May 2019


Title

Intro to GitHub

Overview

Learner will get started with Git by working on a remote repository shared by other workshop learners.

Prerequisites
  • A basic understanding of command-line usage would be helpful, but not required.
Learning
Objectives
After successfully completing this activity, the learner should be able to:
  • Install Git.
  • Configure Git.
  • Fork a GitHub repository.
  • Make changes to a repository.
  • Commit changes to a GitHub repository.
Process Skills
Practiced


Background

For the impatient, you may skip down to the [Directions] section and get started. If you would prefer an overview of Git first, there are some great introductory videos on Git's site: http://git-scm.com/ . Namely:

  • Git Basics: What is Version Control?

    If you are new to version control, or just want to gain a deeper understanding of it, this is 6 minutes of your life well spent.

    Watch the video

  • Git Basics: What is Git?

    This 8 minute video gives you a quick overview of git, why it exists, who it serves, what it can do, and explains some of its advantages.

    Watch the video

  • Git Basics: Get Going with Git

    This 4.5 minute video gives you an overview of installing and configuring git, as well as how to set up your first git repository. You could try to follow along and attempt each step, but I recommend just observing for now and appreciating the simplicity of setup. Later you'll complete a tutorial that will have you perform these same steps.

    Watch the video

  • Git Basics: Quick Wins with Git

    Still not convinced? Need more reasons to use Git? Whether you are gearing up for a water cooler debate about version control systems, or you just want to get a better understanding of the Git philosophy and the features that implement those philosophies, this 5 minute delivers.

    Watch the video

Directions

1. Git: Download, install, and configure git as demonstrated in the videos above. 2. GitHub: Go to https://github.com/foss2serve/github-rollcall-activity and follow the instructions there.

Additional Information

Deliverables

POSSE: Correctly completing the activity on GitHub will add you to the POSSE roll call list on GitHub.

Notes for Instructors

The remaining sections of this document are intended for the instructor. They are not part of the learning activity that would be given to students.

Assessment

  • How will the activity be graded?
  • How will learning will be measured?
  • Include sample assessment questions/rubrics.
Criteria Level 1 (fail) Level 2 (pass) Level 3 (good) Level 4 (exceptional)
Criteria 1
Criteria 2

Comments

  • What should the instructor know before using this activity?
  • What are some likely difficulties that an instructor may encounter using this activity?
ACM BoK
Area & Unit(s)
ACM BoK
Topic(s)
Difficulty

Easy

Estimated Time
to Complete

30-60 minutes

Environment /
Materials

Access to Internet/Web and web browser.

Author(s)

Stoney Jackson

Source

None

License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License

CC license.png


Suggestions for Open Source Community

Suggestions for an open source community member who is working in conjunction with the instructor.

Personal tools
Namespaces
Variants
Actions
Events
Learning Resources
HFOSS Projects
Evaluation
Navigation
Toolbox