Github Web Interface
Github is a Web-based hosting service that is primarily used for storing coding projects. Github can be used as a version control tool, and can be used for creating webpages. This page will outline some of the things that are possible when using Github.
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 project1. 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:
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:
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:
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. You can “Clone or download” if you want to update your files locally, then upload them later. If you choose to “Create new file”, you will see the following screen:
When creating a new file, give the file a name (and include the extension, if applicable). You may keep the file blank to create it, in case 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! 2
Other Functionalities
You may 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. 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
- Definition of repository: A storage area where a version control system stores the full history of commits of a project and information about who changed what, when. Reference: SW Carpentry. ↩︎
- Definition of commit: To record the current state of a set of files (a changeset) in a version control repository. As a noun, the result of committing, i.e. a recorded changeset in a repository. If a commit contains changes to multiple files, all of the changes are recorded together. Reference: SW carpentry. ↩︎