Workshop setup: SVN-to-Git mock repo

Instructions for the instructor to create the shared repository that participants will clone and push to during the workshop.

1. Create the repo on GitHub

Create a new repository (e.g. git-workshop). Do not initialize it with a README (we set it up manually below).

2. Populate it

mkdir git-workshop && cd git-workshop
git init
git branch -M main

# Starter file used in Exercise 1 (staging)
printf "Line 1\n" > notes.txt

# .gitignore (C / Magma projects)
cat > .gitignore << 'IGNORE'
*.o
*.so
*.a
*.dylib
build/
_build/
*~
*.swp
.*.swp
.DS_Store
IGNORE

git add notes.txt .gitignore
git commit -m "Initial commit"

# Second commit so git log shows some history
printf "# Git Workshop\n\nStarter repo for the SVN-to-Git workshop.\n" > README.md
git add README.md
git commit -m "Add README"

# Push
git remote add origin git@github.com:Magma-Maths/git-workshop.git
git push -u origin main

3. Grant push access

Everyone needs write access to the repo so they can push during Exercise 2.

4. Before the workshop

5. After the workshop

The repo will contain each participant’s personal file from Exercise 2 and possibly messy merge history. You can archive or delete it.

To reuse the repo for another session, reset it:

git checkout main
git reset --hard <initial-commit-hash>
git push --force origin main