This document explains how to work with this repository as a team. Please read it carefully before making any changes to the codebase.
git clone https://github.com/MortyBiomech/HipExo-EEG-Study.git
cd HipExo-EEG-StudyThe file config/study_config.m is not tracked by git because it contains
local paths that differ per machine. Copy the template and fill in your paths:
cp config/study_config_template.m config/study_config.mThen open config/study_config.m and set config.data_root to wherever
you store the data on your local machine or the shared network drive.
Never commit study_config.m to git.
main <- stable pipeline only - never work here directly
|
└── dev <- integration branch - your pull requests go here
|
└── feature/xxx <- your personal working branch
You will only ever work on feature/ branches.
You cannot push directly to main or dev - GitHub will reject it.
git checkout dev
git pull origin devgit checkout -b feature/your-descriptive-nameName your branch clearly, for example:
feature/stage3-ersp-analysis-<YOUR_NAME>feature/stage2-amica-preprocessing-<YOUR_NAME>feature/utils-bad-channel-detection-<YOUR_NAME>
Make changes, test them, then commit regularly with meaningful messages:
git add filename.m
git commit -m "Add ERSP computation for stage 3 epoching"Good commit messages:
✅ Add ERSP computation for stage 3 epoching
✅ Fix hysteresis threshold in detect_gait_events
✅ Update study_config_template with new subject list
Bad commit messages:
❌ fix
❌ changes
❌ update stuff
❌ asdfgh
If others have merged changes into dev while you were working,
bring those changes into your branch to avoid conflicts later:
git checkout dev
git pull origin dev
git checkout feature/your-descriptive-name
git merge devResolve any conflicts, then continue working.
git push origin feature/your-descriptive-name- Go to the repository on GitHub
- Click "Compare & pull request" next to your branch
- Set the base branch to
dev(notmain) - Write a short description of what you changed and why
- Request a review from Morteza
- Wait for approval before merging
function output = my_function(input1, input2)
% MY_FUNCTION One-line description of what this does.
%
% Inputs:
% input1 - description
% input2 - description
%
% Output:
% output - description- No hardcoded paths - use
config.data_rootfromstudy_config.m - No hardcoded subject numbers or condition names - use
config.subjectsandconfig.conditions - Test your code on at least one subject before opening a pull request
- Delete your feature branch after it has been merged
- Never commit data files to git - no
.xdf,.set,.fdt,.mat - Data is stored on the shared network drive - ask Morteza for access
- If you accidentally stage a data file, remove it before committing:
git reset HEAD filename.mat- If you accidentally committed a large file, tell Morteza immediately before pushing - it is much easier to fix before it reaches GitHub
If something is unclear or broken:
- First check if the issue is in your local
study_config.m - Check the existing issues on GitHub - someone may have had the same problem
- If it is a new problem, open a GitHub Issue with:
- What you were trying to do
- What error message you got (copy the full error, not a screenshot)
- Which file and line number the error points to
| Action | Command |
|---|---|
| Update dev | git checkout dev && git pull |
| New branch | git checkout -b feature/name |
| Stage file | git add filename.m |
| Commit | git commit -m "descriptive message" |
| Push branch | git push origin feature/name |
| Merge dev into your branch | git merge dev |
| Check status | git status |
| See history | git log --oneline |
For questions about the pipeline itself, contact Morteza. For questions about git, check https://docs.github.com or open a GitHub Issue.