Git Guide
Git is supported on the NCSU campus by NCSU GitHub. As a student, you will work in Eclipse, commit your code to your local repository (on your own computer), and push your code from your local repository to your NCSU-hosted remote repository on NCSU GitHub. The teaching staff will grade your code that is on remote repository by running it through tests that reside in the teaching staff repositories.
Learning Outcomes
- Work with the NCSU GitHub website
- Set up your local Eclipse for Git
- Set up your local file system to work with Git Bash
- Identify and execute common Git tasks
There are two main ways to interact with Git locally:
- with the Eclipse EGit plug-in, or
- with a git client for your operating system.
Each section below will approach the topic from both the Eclipse Egit plug-in and git bash perspective. The last two sections provide an example workflow with each tool. A third way is to use a Git GUI tool; however, this guide will only discuss the EGit plug-in and command line git bash client.
Table of Contents
The guide will cover the following items:
- Git Introduction
- Git at NCSU
- Installing Git Tools
- Git Help
- First Time Git Configuration
- Get a Repository
- Cloning a Repository
- Ignore Specified Files
- Loading a Project in Eclipse
- Sharing an Existing Java Project to your Repository
- Importing an Existing Project from your Repository
- Adding Files to your Staging Area
- Commit to Your Local Repository
- Remote Repositories
- Push Your Local Repository to Your Remote Repository
- Pull Your Remote Repository Contents to Your Local Repository
- Handling Merge Conflicts
- Retrieving Older Versions of Files from Your Repository
- Git Workflow