State Diagram Git Lab

BME554L - Fall 2026 - Palmeri

Lab
Author

Dr. Mark Palmeri, M.D., Ph.D.

Published

September 1, 2026

Git Practice

This week we will go through a very simple git workflow to get you familiar with the process and to confirm that your toolchain works for future assignments.

Initial main Branch Development

  1. Make sure that you have git installed, ssh keys configured, and your Duke GitLab account is setup, as detailed here
  2. Be sure to review the tutorials outlined on the git setup page, as needed, to complete the tasks below.
  3. Create a forknot a clone–of the state-diagram-git-lab in your userspace.
  4. Add Dr. Palmeri (mlp6) as a Maintainer of your forked repository (Left Sidebar: Manage -> Members -> Invite members)
  5. Clone your forked repository to your laptop using the URL available under the blue Code button: Clone with SSH.
Important

You want to clone your forked repository, not the parent repository you forked from!

Working on a Branch (Local)

  1. Create a development branch called update_state_diagram and switch into it.
  2. Update README.md to include the state diagram that you worked on in the Event-Drive State Machine lab. There is a section in the README.md file that has a placeholder for this diagram.
  3. Add and commit these changes in the git repository with a meaningful commit message.
  4. Push this new branch to the remote (origin) of your GitLab repository.
  5. Confirm that you can see your latest commit on this branch on the GitLab website.

Merge Request Time!

  1. Create a new Merge Request on the GitLab to merge the update_state_diagram branch into the main branch.
    • Assign the Merge Request to yourself.
    • You do not need a Reviewer.
    • You do not want to squash or rebase your branch commits
    • You do not want to delete the source branch.
  2. Check that the CI pipline jobs have passed.
    • Build -> Pipelines
    • Click on the latest pipeline (the colored rounded rectangle button in the status column).
  3. If the pipeline jobs for this branch have failed, you will need to fix the issue(s) and push the changes to your update_state_diagram branch.
    • If you are not sure what the issue is, click on the failed job to see the output of the test.
    • If you are not sure how to fix it, ask for help!
  4. Once your CI jobs pass, approve your Merge Request on the GitLab website and Merge your update_state_diagram branch into main.
  5. Checkout the main branch on your laptop and pull the latest changes from the GitLab server.
  6. Confirm that you can see the updated README.md file in your main branch, along with its associated commit in your git commit history.

Create an Annotated Tag

  1. On the main branch on your local machine, create an annotated tag for this commit associated with your merged update_state_diagram branch called v1.0.0, with the message "include the state diagram info".
  2. Push this annotated tag to the GitLab server (origin).
  3. Confirm that you can see your latest commit and tag on the GitLab website.
  4. You should see that the check_v1_0_0_tag pipeline job has passed if this was successful.

How to Ask for Help

  1. If you have a general / non-coding question, you should ask your TAs / Dr. Palmeri on Ed to allow any of them to respond in a timely manner.
  2. Push you code to your GitLab repository, ideally with your active development on a non-main branch.
  3. Create an Issue in your repository.
    • Add as much detail as possible as to your problem, and add links to specific lines / section of code when possible.
    • Assign the label “Bug” or “Question”, as appropriate.
    • Be sure to specify what branch you are working on.
    • Assign the Issue to one of the TAs.
    • If your TA cannot solve your Issue, they can escalate the Issue to Dr. Palmeri.
  4. You will get a response to your Issue, and maybe a new branch of code will be pushed to help you with some example syntax that you can use git diff to visualize.

What to Submit

  • Create an Issue on your GitLab repository called Git Fundamentals Lab Submission.
  • Assign the issue to Dr. Palmeri.