Instructions for the instructor to create the shared repository that participants will clone and push to during the workshop.
Create a new repository (e.g. git-workshop). Do not initialize
it with a README (we set it up manually below).
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
Everyone needs write access to the repo so they can push during Exercise 2.
git@github.com:Magma-Maths/git-workshop.git
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