Updated course09b.txt

Lynn Langit authored
revision e5469210234efbeebd21b07e8796efc6291cd2c7
course09b
# Using GitHub with TKP Students

To understand the what, why, when and how of using Github, you'll need to understand some concepts in the storage/management of software source code files:

## What and why

1. **Source Code Files** - these are your code files, for TKPJava, for example 'SimpleSquare.java'
1. **IDE / Code Editor** - this is where you write your code, we use Eclipse or Codenvy
1. **Open Source Code Files** - if you copy your files to a public website, this is called OSS
1. **Source Control Systems** - rather than using a file system, source control systems allow you to store, see and revert to any version of any line of all stored code file. They have a client (on your machine) and optionally a server (on a remote machine, can be on the internet) interface.
1. **Repository** - container, like a local drive (i.e. 'C:/' that holds all of the folders, code files and any other files need for your project, other files can be images, text files, etc...
1. **Open Source Code Source Control Systems** - the server interface is on the internet. The most popular is OSS is GitHub.
1. **Git** - a popular code source control tool, which can be installed both locally and on a remote server. The interface to work with Git is via the command line. The git client tools can be downloaded [here](https://git-scm.com/downloads), the git server can be installed on any remote machine, this includes remote machines hosted on the public internet. Git itself is free and open source.
1. **GitHub**:octocat: - a popular open source control system which provides a GUI (and additional features) on top of Git. GitHub is a public website. It's services, hosting public code repositories is free. GitHub also has a commercial offering, which allows clients to have private code repositories. Users can install and either git (command-line) or a GitHub GUI client to connect to the GitHub server.
1. **Tools for GitHub**- Many code IDEs include git client IDE integration (command line and/or GUI add-ins) for code source control - example Eclipse, Codenvy, VSCode...

_TIP: Here's a list of items to install to use GitHub, listed [here](https://services.github.com/checklists/)_

##How
Because learning version control systems is a somewhat daunting task, even for professional developers, we at TKP have decided to take the 'minimum viable source control' approach to guide teachers in getting starting using GitHub with their TKPJava students.

Here's a step-by-step guide:
- **Register** for an account on [GitHub.com](https://github.com/)
- **Download and Install** [GitHub Desktop](https://desktop.github.com/) - be sure to get the version for your OS (i.e. either Windows or OSX)
- **Create a Repository** on the GitHub site - [step-by-step here](https://help.github.com/articles/create-a-repo/)
- **Write code** using your IDE
- :eyeglasses: **Use your programming tools** - here are some free code editors
- [[Eclipse]](https://eclipse.org/downloads/)- the TKP source files include a customized set of settings for Eclipse
- [VS Code](https://code.visualstudio.com/download) simple and useful code editor
- [Beaker Notebook](http://beakernotebook.com/) great for data science languages
- [Eclipse Che](http://www.eclipse.org/che/) powerful Eclipse replacement
- [Sublime](https://www.sublimetext.com/download) basic text editor
- [Atom](https://atom.io/) hackable editor
- **Authenticate** your GitHub Desktop client with your GitHub credentials - step-by-step instructions [here](https://help.github.com/desktop/guides/getting-started/authenticating-to-github/)
- **Push your code**to your new repository via your GitHub GUI client, do this by entering a commit message, and then clicking the 'commit' button on the GUI, next click on the upper right 'sync' button to send your code to GitHub

_Note: Students must be age 13 or older to be permitted to [use GitHub directly](https://help.github.com/articles/github-terms-of-service/)._

##Best Practices and More Information and Links:

- :computer: **Write code frequently**
- :octocat:
**Contribute to open source projects** on [GitHub](https://github.com/)
- See 5 minute intro [here](https://github.github.com/on-demand/intro-to-github/)
- Get desktop client [here](https://desktop.github.com/)
- Get the ['student developer pack' here](https://education.github.com/pack)
- See 15 minute on-line tutorial [here](https://try.github.io/levels/1/challenges/1)
- GitHub getting started guide [[here]](https://guides.github.com/activities/hello-world/)
- 4 short 'Commit yourself GitHub' screencasts [[here](https://www.youtube.com/watch?v=HmYaZWU97GM)]


##Next Steps
Git includes many other concepts, including making distributed copies via forking and branching. These concepts are often used by professional software developer teams. For a concise explanation - [see this link](https://guides.github.com/introduction/flow/).

Happy OSS Programming!

The TKP Team