Skip to content

tomkdefra/collaborate-with-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Collaborative Story Writing with Git and GitHub

Welcome to our "Exquisite Corpse" style collaborative story writing game using Git! In this activity, each participant will add to a story with a hint left in the commit message, maintaining the element of surprise.

To avoid participants prematurely seeing the story file and ruining their surprise, we will use the echo command in a Git Bash terminal to add our lines to the story. The -e flag enables interpretation of backslash escapes, so at the end of our addition we can add a \n newline character to keep our story formatting nice and tidy. The >> operator appends the new addition to the file.

Workflow

First Participant

  1. Write the first part of the story in story.txt:

    echo -e "Our story is going to be great and stuff is going to happen. Suddenly, something happened... \n" >> story.txt
  2. Commit and push:

    git status
    git add story.txt
    git status
    git commit -m "Suddenly, something happened..."
    git status
    git push origin main

Second Participant

  1. Pull changes:

    git pull origin main
  2. Check the commit message hint:

    git log --oneline -1
    • Suddenly, something happened...
  3. Write the next part of the story in story.txt:

    echo -e "Blah blah blah and etc...\n" >> story.txt
  4. Commit and push:

    git status
    git add story.txt
    git status
    git commit -m "and etc..."
    git status
    git push origin main

Third Participant

  1. Pull changes:

    git pull origin main
  2. Check the commit message hint:

    git log --oneline -1
    • and etc...
  3. Write the next part of the story in story.txt:

    echo -e "Blah blah blah and etc...\n" >> story.txt
  4. Commit and push:

    git status
    git add story.txt
    git status
    git commit -m "and etc..."
    git status
    git push origin main

Final Merge

  1. Once every participant has had a couple of turns, we can pull all changes and read the story:

    git pull origin main
    cat story.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published