Github

Github is a Web-based hosting service that is primarily used for storing coding projects.  Github can be used as a version control tool, which is important when working on projects, and is even useful for creating webpages.  This page will outline some of the things that are possible when using Github.

Github Web Interface

NC State provides students with free access to a Github account that can be used to store files in public, or private, repositories. A repository (repo, for short) is an online collection of files that make up a project.  Each account is allowed multiple repositories, each of which can track all previous versions of the project.  

After you have activated your Github Account (using your NC State Gmail account), you can navigate to github.ncsu.edu and you should see the following screen:

Github home page emphasizing the "New Repository" button

In this view, you can see some of the repos that you are a part of.  Here, you can also see recent activity in all the repos you contribute to.  You can start a new repo by clicking the “New repository” button (pictured above).  Once you click this button, you will see the following screen:

Entering a new repository's details

When you start a repo, you are required to enter a name, and it is optional to enter a description for the repo (highlighted in green).  It is recommended to have a description for your repo if you intend to make it public.  You can decide to make the repo public or private by clicking the button next to either option (indicated by the blue arrow).  Making a repository private means that it is hidden to anyone that you do not explicitly give access to.

You also have the option to create a README file (indicated by the red arrow).  It is recommended to always check this box when creating a new repo, unless you are importing an existing repository.  Once you click the “Create Repository” button, you will see the following screen:

Repository page

You are given the options to:

  • Create new file
  • Upload file
  • Clone or download

If you have a file ready to upload, choose the “Upload file” option, and you will be taken to a standard upload interface.  “Clone or download” is if you intend on using command-line git or the desktop app.  If you choose to “Create new file”, you will see the following screen:

Commiting a file through GIthub's web GUI

When creating a new file, you must give the file a name (including the extension). You are allowed to keep the file blank to create it, in the case that you just need the file in the repo. Whether you are uploading a file or editing the file, you MUST include what is called a commit message (Highlighted in green). This message is a description about what updates were made to the file since the last time it was edited. There is also an option to add an extended description, in case your message or changes need further explanation.  Then, click “Commit (new) file” to create/update the file!

Other Functionalities

Sometimes people find it convenient to use git on the command line to access their files hosted on GitHub. To read more about using git commands to work with your repositories: https://e115.engr.ncsu.edu/advanced-unix-commands/command-line-git/.  

GitHub also allows users to host websites. If you are interested in how to set up your GitHub account to host a website, follow the instructions here: https://e115.engr.ncsu.edu/introduction-to-xhtml/github-account-preparation/

Migrating a Repo

Your GitHub account is tied to your unity account, so when you leave the university, you will no longer have access to your projects. Not to worry! GitHub has a guide for migrating your repositories to a personal account.

More Help

If you need additional help or extra information, check out the FAQ provided by ITECS.