Welcome to the Nebula Labs Fall 2026 Git and Github workshop! If you run into any problems, don't be afraid to ask for help! Since this workshop is self guided, you can complete this at your own pace, or even share with others
Check out Nebula Lab's discord. We're here to help!
Check out the optional slides associated with this workshop
Be sure to check out the Git cheat sheet
The symbol ~ represents your home directory. For example, ~/Projects/ represents a folder called Projects inside your home directory.
- On Windows,
~is equivalent toC:\Users\<YourUsername>- You can navigate to this folder in File Explorer by opening
This PC -> Local Disk (C:) -> Users -> <YourUsername>
- You can navigate to this folder in File Explorer by opening
- On macOS,
~is equivalent to/Users/<YourUsername>- You can navigate to this folder in Finder by clicking
Go -> Homein the top menu bar.
- You can navigate to this folder in Finder by clicking
- On Linux,
~is usually equivalent to/home/<YourUsername>
If you're not using Windows, you can skip to Install Required Tools. Windows has several different terminal environments, called shells. The most common shells are PowerShell, Command Prompt, Git Bash, and WSL (Windows Subsystem for Linux). PowerShell and Command Prompt are built-in to Windows. You can tell which shell you are using by looking at the prompt. It will look different depending on the shell.
For example, PowerShell will look something like this:
PS C:\Users\<YourUsername>And Command Prompt will look something like this:
C:\Users\<YourUsername>Git Bash will look something like this:
<YourUsername>@<YourComputerName> MINGW64 ~/And finally WSL will look something like this (Quite similar to Git Bash):
<YourUsername>@<YourComputerName> ~/For this guide, we recommend using PowerShell, and all code blocks will assume you are using PowerShell. You can change what shell your using by clicking the dropdown at the top of Terminal.
Git is the version control system that tracks your changes. It is a command-line tool.
- Windows: Download and install Git for Windows (which includes Git Bash).
- macOS: Run
xcode-select --install - Linux: Git is likely already installed, but if not
- Debian / Ubuntu:
sudo apt update && sudo apt install git - Fedora:
sudo dnf install git - Arch:
sudo pacman -S git
- Debian / Ubuntu:
Verify your installation:
git --versionGitHub Desktop provides a visual interface for managing repositories, branches, and commits.
- Download and install from desktop.github.com.
- Launch GitHub Desktop and sign in to your GitHub account
VS Code is a very popular and lightweight code editor with built-in Git tools and an integrated terminal.
- Download and install from code.visualstudio.com.
- Launch VS Code and go through the initial setup
calculator.c is written in C. Installing a C compiler lets you compile and run the program locally.
- Windows: Install MSYS2 / MinGW, use WSL, or install Visual Studio Build Tools.
- If you're not sure which to pick, choose MinGW.
- macOS: You should already have it, but if you haven't already, run
xcode-select --installin Terminal (installsclang/gcc). - Linux:
- Debian / Ubuntu:
sudo apt install build-essential - Fedora:
sudo dnf groupinstall "Development Tools"
- Debian / Ubuntu:
Verify compiler installation:
gcc --versionor
clang --versionRun the following 2 commands to set your name and email so commits are properly attributed to you. Replace Your Name with your name and your_email@example.com with your email address.
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"Important
Ensure the email address matches the one associated with your GitHub account so GitHub links commits to your profile.
Using SSH (Secure Shell) allows you to securely connect and authenticate with GitHub from your terminal without needing to enter a password or token each time.
Run the following command. Replace your_email@example.com with your GitHub email
ssh-keygen -t ed25519 -C "your_email@example.com"When prompted:
- Enter file in which to save the key: Press Enter to accept the default file location (
~/.ssh/id_ed25519). - Enter passphrase: (Optional) Enter a passphrase for additional security, or press Enter twice to proceed without one.
Display your public key to copy it:
-
Windows (PowerShell):
Get-Content ~/.ssh/id_ed25519.pub -
macOS:
cat ~/.ssh/id_ed25519.pub -
Linux:
cat ~/.ssh/id_ed25519.pub
Copy the entire output starting with ssh-ed25519 and ending with your email.
- Open github.com in your browser and log in.
- In the top-right corner, click your profile photo and select Settings.
- In the left sidebar under the Access section, select SSH and GPG keys.
- Click the green New SSH key button.
- In the Title field, enter a descriptive label for your device (e.g.
Personal Laptop). - Leave Key type set to Authentication Key.
- In the Key field, paste your copied public key.
- Click Add SSH key (confirm your GitHub account password if prompted).
Verify that your SSH connection to GitHub is working:
ssh -T git@githubproxy.fjygbaifeng.eu.orgIf prompted with a message like:
The authenticity of host 'github.com (IP)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Type yes and press Enter.
You should see a confirmation message:
Hi <YourUsername>! You've successfully authenticated, but GitHub does not provide shell access.
A fork is your own copy of a repository. Fork this repository by selecting the fork button on GitHub.
Important
Git and other development tools will generate lots of files. This can cause slowdowns and other issues with OneDrive, iCloud, or Google Drive. Windows backs up the Desktop and Documents in OneDrive folders by default, and you may have these folders backed up with iCloud on macOS. For those reasons, consider putting your Git projects in ~/Projects/. (Don't forget what ~ means from Important Background Information.)
After choosing a location and creating the folder, open that location in your terminal with cd. cd stands for "change directory". For example:
cd ~/ProjectsYour terminal should now show that it is in Projects/ or whatever directory you chose. It may not look exactly like this depending on your operating system, but it should now say "Projects" somewhere in your prompt.
user@hostname:~/Projects$Copy the ssh url of your forked repository by selecting <> Code then ssh. It should start with git@github.com. Make sure you are on the page of your fork and not UTDNebula's github-workshop

Finally it's time to use our first real Git command!
git clone <ssh-url starting with git@github.com>This will download the files from this Github repository (including this README.md file!) into a folder called github-workshop-2026f.
Enter that folder with
cd github-workshop-2026fUse the ls command to see the contents of the directory
lsIn the command's output, you should see a file called calculator.c
Almost there! Now run git status
git statusThis should say something like:
Your branch is up to date This means that your local repository is up to date with the remote repository on GitHub. If it's not that means we need to "pull" from the remote repository (GitHub). If we have changes, we can "push" them to GitHub
The best way to learn git is by doing, so now that we've cloned the repository, we can start working with Git through a series of challenges! Don't forget you can use the Git cheat sheet for reference with the git command line. Try using git through the command line, GitHub Desktop, and VS Code. See what you like. This section has a lot less help, so if you get stuck, don't be afraid to ask for help!
Open GitHub Desktop. You should've installed this in install required tools
Add the repository with File > Add Local Repository and choose the github-workshop-2026f folder we cloned earlier
Open the github-workshop-2026f folder in your code editor. (In VS Code, File > Open Folder)
Edit calculator.c. Replace the text "Your Name Here" in the print_banner(void) function with your name.
Save your changes
Stage your changes
Commit your changes (don't forget to add an informative commit message)
You'll know you're done with this when you get this as the output to git status:
Your branch is ahead of '...' by 1 commit.Create and switch to a new branch called feature/multiply
Add this multiply(int a, int b) function to calculator.c:
int multiply(int a, int b) {
return a * b;
}Stage and commit the change on your new branch.
Push your branch to your remote repository on GitHub.
Now, in GitHub, verify that your branch changes show when you try changing branches
Open UTD-Nebula's github-workshop-2026f repository on GitHub
Open the Pull requests tab and create a Pull Request with your changes. You may need to click "Compare across forks"
Write a clear PR title and a description explaining what you changed
This can be one of the most challenging parts of Git
A merge conflict happens when two branches modify the same line of code differently and Git cannot guess which version you want
β [conflict-test-a]: banner says "Nebula Labs Git Workshop"
/
develop: β ββββββββ
\
β [conflict-test-b]: banner says "Nebula Labs GitHub Workshop"
-
Ensure you are on
develop(ormain). -
Create and switch to a branch named
conflict-test-a. -
In
calculator.c, change the title line inprint_banner()to:printf("Nebula Labs Git Workshop\n");
-
Stage and commit with message:
"Add Git to workshop banner".
-
Switch back to
develop(ormain). -
Create and switch to another branch named
conflict-test-b. -
In
calculator.c, change the exact same title line inprint_banner()to:printf("Nebula Labs GitHub Workshop\n");
-
Stage and commit with message:
"Add GitHub to workshop banner".
Attempt to merge conflict-test-b into conflict-test-a
If merging with the command line, Git will create these conflict markers. VS Code tries to format them
<<<<<<< HEAD
printf("Nebula Labs Git Workshop\n");
=======
printf("Nebula Labs GitHub Workshop\n");
>>>>>>> conflict-test-b<<<<<<< HEAD: The code currently on your active branch (conflict-test-a).=======: The separator between the two conflicting versions.>>>>>>> conflict-test-b: The incoming code from the branch being merged.
Decide on the final code. Combine both ideas into a clean banner:
void print_banner(void) {
printf("Nebula Labs Git/GitHub Workshop\n");
...
}Delete all conflict markers (<<<<<<<, =======, >>>>>>>).
Finish your merge. We often use a merge commit, but Git also supports rebasing
If you have a C compiler installed (gcc or clang):
Compile calculator.c
gcc calculator.cThis should create a new file named a.exe (on Windows) or a.out (on macOS/Linux).
Run the executable
On Windows using PowerShell
./a.exeOn macOS and Linux:
./a.outInputs: a = 12, b = 4
----------------------------------------
Addition: 12 + 4 = 16
Subtraction: 12 - 4 = 8
Multiplication: 12 * 4 = 48
Congratulations! You have practiced the fundamental workflows used by software engineering teams worldwide:

