Welcome to the TUDev Git Telephone Workshop! ๐
In this activity, weโll learn Git basics by playing a fun spin on the classic telephone game. Instead of whispering a phrase, weโll pass it along through commits and branches. By the end, weโll merge everything together into one (probably hilarious) final sentence.
- How to clone a repository
- How to branch and work in parallel
- How to commit changes
- How to push and pull from GitHub
- How to merge branches and resolve conflicts
story.txt
โ contains the starting sentence:TUDev is awesome!
README.md
โ this file (instructions).
-
Clone your team repo
git clone <your-team-repo-url> cd git-telephone
-
Create a branch with your name
git checkout -b edit-yourname git push -u origin edit-yourname
-
Make your edit
- Open
story.txt
- Change the sentence slightly (like in the telephone game).
- Open
-
Commit your change
git add story.txt git commit -m "Changed story to: TUDev hosts pizza robots!" git push
-
Pass it to the next teammate
- The next teammate pulls and repeats:
git pull origin edit-theirname
- The next teammate pulls and repeats:
Once everyone has made their edits:
-
One teammate (the โmergerโ) switches to
main
:git checkout main git pull origin main
-
Merge each teammateโs branch into
main
:git merge edit-yourname git merge edit-teammate git push origin main
-
If thereโs a conflict, open
story.txt
, resolve the conflict, then:git add story.txt git commit git push
At the end, TUDev will merge all team repos into one final story. Weโll read it aloud together to see how the message transformed.
โจ Have fun and donโt worry if you hit a conflict โ thatโs part of the game!