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
- Source Code Files - these are your code files, for TKPJava, for example 'SimpleSquare.java'
- IDE / Code Editor - this is where you write your code, we use Eclipse or Codenvy
- Open Source Code Files - if you copy your files to a public website, this is called OSS
- 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.
- 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...
- Open Source Code Source Control Systems - the server interface is on the internet. The most popular is OSS is GitHub.
- 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, 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.
- GitHub - 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.
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
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
- Download and Install GitHub Desktop
- Create a Repository on GitHub
- Open your code IDE, write some code
- Connect via GitHub Desktop to your new GitHub repository
- Push your code to your new repository via your GitHub GUI client
Note: Students must be age 13 or older to be permitted to use GitHub directly.
Best Practices and More Information and Links:
- Write code frequently (daily!)
- Teach others
- Build stuff for yourself
- Contribute to open source projects on GitHub
- Use your programming tools - here are some free code editors
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.
Happy OSS Programming!
The TKP Team