A practical guide for anyone working in the banich_lab repository. This tutorial explains setup, GitHub concepts, the daily workflow, pull requests, merge preparation, and what to do when multiple people are working on the same code.
Use a name like yourname-task or yourname-task-description.
Examples:
jake-update-readme
marie-fix-data-import
kenny-add-plot-function
Commit messages
Use clear descriptions that explain what changed.
Examples:
Fix file path in preprocessing script
Add example data to docs folder
Update README with setup steps
12. Common mistakes to avoid
Do not work on mainAlways create a branch first.
Do not skip pullingStart by updating main.
Do not use vague commitsAvoid messages like stuff or updates.
Do not mix unrelated editsKeep one branch focused on one purpose.
13. Command line version
This is the same workflow using terminal commands.
git clone https://github.com/jakederosa123/banich_lab.git
cd banich_lab
git checkout main
git pull origin main
git checkout -b yourname-task
git add .
git commit -m "Describe changes"
git push -u origin yourname-task
What these commands mean
git clone downloads the repository.
cd banich_lab moves into the project folder.
git checkout main switches to the main branch.
git pull origin main downloads the newest changes from GitHub.
git checkout -b yourname-task creates and switches to a new branch.
git add . stages your changes.
git commit -m "Describe changes" saves your changes locally.
git push -u origin yourname-task uploads your branch to GitHub.
14. Quick examples
Example 1, updating a README
Pull main.
Create branch jake-update-readme.
Edit README.md.
Commit with message Update README setup instructions.
Push and open pull request.
Example 2, two people editing different files
Person A works on scripts/analysis.py in one branch. Person B works on docs/setup.md in another branch. Both can open separate pull requests with little risk of conflict.
Example 3, two people editing the same script
Both people should still use separate branches. The first pull request merges into main. The second person should then pull the updated main, update their branch, resolve any conflicts if needed, and then finish the pull request.