GITing Started
These instructions will ensure you can participate in the course by verifying you
- have correctly installed the course software
- can use it to develop Java programs with OpenJFX (required for some of the example programs, but not the larger team projects)
- can submit your code to the course's Gitlab group
Download and Install Development Software
Videos
Configure GIT
These instructions use the command-line when interacting with GIT. Even if you have a preferred graphical tool or it is built into your Development Environment, you should be able to do the basics on the command-line:
Completing this step is vital so the Teaching Team can identify the code you write during the semester.
Login to Gitlab
- Within a Browser, go to the website: https://coursework.cs.duke.edu/
- Press the
Shibboleth button to log in using your Duke NetID
- After you have successfully been logged in through Duke's standard log in page, you should see your Dashboard
- If you have never used this Gitlab site in another CompSci course OR you have a new computer since you last used it, then you will need to generate a new SSH key
- Otherwise, you should be able to skip the next section
Generate an RSA SSH Key
- Within a Browser, go to the website: https://coursework.cs.duke.edu/help/user/ssh.md
- If you have not already generated an SSH key for another class:
- If you have not already connected your current computer to our Gitlab site (
coursework):
- Within Terminal/Shell, copy the public key using the command corresponding to your OS given in the section Add an SSH key to your GitLab account
- Within a Browser, paste the copied public key into the Gitlab text area (
Preferences → SSH Keys → Key Text Area)
giving it the same title: id_rsa, and press Add key
Completing this step is vital to allow you to access the course Gitlab server (there is no password option).
Get your Own Copy of a Gitlab Project's Starter Code
- Within a Browser, visit your assignment project code, CompSci590_2026Spring/maze_NETID
- Copy the SSH URL (e.g.,
git@coursework.cs.duke.edu:compsci590_2026spring/maze_NETID.git)
Note, it is will appear as an option when you press the blue Code button
Clone your Copy of the Project onto your Local Machine
- Within Terminal, change to a folder you want to hold all your course projects (
WORKSPACE_FOLDER can be any folder you want as long as there are no spaces anywhere in the path)
cd WORKSPACE_FOLDER
- Download a local version of the project that is linked to your Gitlab repository
git clone git@coursework.cs.duke.edu:compsci590_2026spring/maze_NETID.git
- That command should create a folder named
lab_bounce within your workspace folder that contains configuration information for GIT (e.g., a folder named .git — note that it starts with a period)
ls -a maze_NETID
Create a Project from your Local Copy
- Within your IDE, open the newly cloned folder using
File → Open (for IntelliJ)
- Select the folder you just created,
maze_NETID, and press Open
- Once the project window appears, you will need to a few more steps to get it to run:
Note, depending on the speed of your machine, it may take a little while to recognize and setup the project, as well as download some files this first time.
- Click on the Project label in the leftmost gutter to expand the contents of your project folder
- Click to expand the folders
src → java → main to find the Java class Main
- Right click on this class to run it by selecting
Run Main.main()
- Run the program to verify that your Java installation is working
If there are compilation errors or it does not run, then you may not have installed the latest versions of Java or IntelliJ or the project is not correctly configured.
Completing these steps verifies your Java and IntelliJ installations are correct and working together.
Push Changes Made to your Project back up to Gitlab
-
Within Terminal, your maze_NETID folder should now have the configuration folders for both GIT (e.g., .git) and IntelliJ (e.g., .idea)
ls -a lab_bounce
- Within IntelliJ, the file
README.md should already be open in Preview mode. Change it Edit and Preview mode by pressing the middle blue icon in the pane's upper right corner.
- Add your name and save the file
When you do this, you should see the file's name in the Project View's list of files change color to indicate GIT knows it has been changed
- Within Terminal, you can verify that GIT also knows that it has been changed by typing
git status
- Add your changed files to those staged for your next commit
git add README.md
- Then note that all the added files should be grouped together into a single commit to the repository, with a message describing the changes contained in this commit
git commit -m "Included my name in the README"
- Push all your commits to the remote repository, e.g., Gitlab, so that others (UTAs, teammates, etc.) can see your changes
git push -u origin main
- Within a browser, refresh the Gitlab page for your repository to see your changed README file
Completing this step verifies you can correctly access the course Gitlab group to submit your work for the semester.
Setup IntelliJ to Fix Code Indentation Issues
The Coding Standards for this project are Google's Java code format standards.
Set up IntelliJ to do this for you automatically:
- Download intellij-java-google-style.xml from its GitHub repository
- Go to the IntelliJ menu and select
Preferences
- In the dialog that appears, select
Editor → Code Style
- On the line that says
Scheme, click on the gear icon after the Combo Box with the tooltip Show Scheme Actions
- Click on
Import Scheme → IntelliJ IDEA code style XML
- Select the previously downloaded XML file and then
Open
- Finally unselect the option
Enable EditorConfig support before clicking OK to close the dialog box
IntelliJ should now monitor your Code Formatting, but you can reformat code in any file to follow these conventions by selecting the menu Code → Reformat Code (especially before pushing it to the remote repository!).