• U.S. members: The Federal Government is offering each household in the United States four (4) free at-home Covid-19 test kits. https://www.covidtests.gov/

Anyone ever use GitHub to publish a story?

editing_for_authors
Editing for authors: because every writer needs a good editor.

ChaseJxyz

Writes birds and bird accessories
Super Member
Registered
Joined
Jul 5, 2020
Messages
1,448
Reaction score
1,006
Location
The Rottenest City on the Pacific Coast
Website
www.chasej.xyz
I had absolutely no idea where to post this, so mods please relocate it to the right board if it fits somewhere better.

Yes, I know that GitHub is supposed to be for software/code. But it lets you post Markdown files (which have some good formatting options) AND it has source control/branches which people are free to look at. I'm not planning on putting drafts of a story on there and then having the multiple, unpolished versions visible. I want to have each of the branches be unique/different, of a polished, finished story, and there is a narrative purpose for interacting with the story in that way. Of course, this means that the WIP has to exist in a different repo so I can get everything where I want it and make a separate repo to "publish" the final piece, but that's no big deal.

Does anyone know of any pieces of fiction that have attempted something like this before? What did it do well, what did it struggle with? Or do the professional software devs in the room have any suggestions/tips for features I use to write such a piece of "interactive" fiction?

I already created a quick proof-of-concept based around the Monty Hall problem and the two big issues I've found is that I can't think of a good way to "move forward" from one scene to another (maybe make a hyperlink in the scene to the next scene?) and that there's not a nice big diagram of the branches (The one in insights is tiny and if I generate one myself, I'd have to manually make one for each timeline AND update it if I ever change things, which would be a pain).
 

AW Admin

Herder of Hamsters
Staff member
Administrator
Super Moderator
Moderator
Kind Benefactor
Super Member
Registered
Joined
Apr 19, 2008
Messages
18,432
Reaction score
5,577
Location
On the Server
Not to publish a story, but for version control, yes.
 

jonxihama

Super Member
Registered
Joined
Jun 25, 2021
Messages
69
Reaction score
58
People do this with blog posts but I've never seen someone do this for fiction. You could be a pioneer :)

With Github Pages you could make quite a neat compelling story.
 

Vemahk

Registered
Joined
Sep 9, 2021
Messages
8
Reaction score
5
Location
Somewhere in the Facinity of Beetlejuice
So, I actually found your GitHub through your signature (as a programmer, I was drawn to it lol) on another thread somewhere else while lurking around and poked through some stuff.

I tend to be of the mind to use writing as a form of creative expression and a hobby than really something to be achieved professionally. I sort of have to take that approach, though, since I have sold my soul to programming already and can't fit two professions into my life...

That being said, I've experimented with different forms of storytelling just for the sake of trying something else than "left-right, top-down". I think it would be absolutely fascinating to see how someone may try to pull off using something like Git/Hub (which was very obviously intended for version control) for storytelling.

To your original question, though... No, I haven't seen someone do that. Want to be the first? :D

Here is an idea for you, though the complexity of it may make it infeasible:

There may be only one head to a branch in Git, which means there is one present state of the 'story'. However, the past can be full of branches in the revision history, much like some kind of weird branching timeline, there may be different states in the story that all came together to make it into its final state. It may be possible, using this, to create a kind of narrative backwards in time, so you could tell a story in reverse from the end and show all the different things that had to come together to make it?

... well, maybe - this is all kind of floating around somewhere in my head, and I'm not sure if it even makes any sense. It would take some experimenting and, more importantly, immense planning to utilize revision history in such a way as to tell a story. Perhaps worth the challenge? The audience would be small, but a story built in such a way is intriguing to me.
 

ChaseJxyz

Writes birds and bird accessories
Super Member
Registered
Joined
Jul 5, 2020
Messages
1,448
Reaction score
1,006
Location
The Rottenest City on the Pacific Coast
Website
www.chasej.xyz
There may be only one head to a branch in Git, which means there is one present state of the 'story'. However, the past can be full of branches in the revision history, much like some kind of weird branching timeline, there may be different states in the story that all came together to make it into its final state. It may be possible, using this, to create a kind of narrative backwards in time, so you could tell a story in reverse from the end and show all the different things that had to come together to make it?
That....actually makes a lot more sense than what I was planning.

Background: The story I'd want to tell using this would be a "prequel" to my interactive novel. A few years ago, Tumblr banned all the porn, and they did so by putting in (a Javascript object?) some field like isPorn = TRUE. You could open up inspector in your browser and change it to isPorn = FALSE, then do something like make a post, and the new value in the server for chaseBlog.isPorn is now FALSE, so now people could see my blog again! I randomly remembered that a few months back, and then thought "haha what if you did that with a story? Like you changed the HTML and then that would change what happens in the story?" So it's a mystery novel where you inspect element evidence, there's multiple paths/endings, standard interactive story stuff...it's just the WAY you interact that's novel (and also why I can't use any interactive fiction engine.....and also why the project is at a stand still, because I cannot Javascript good enough to do this myself).

The GitHub story would be about the secondary main character and how she got out of a not-good situation. The "correct" timeline is the one in which she succeeded, otherwise she wouldn't be alive in the main story, and my idea was to have the reader find the proper branch that leads to the "correct" ending. The main timeline would be the "default" one, where she makes (default? no?) decisions, and wouldn't get very far. So the main timeline would be the "original" timeline before she alters the HTML of reality.

But since this IS a prequel, I could go with your suggestion and have the main branch/timeline be the "correct"/true one that leads to the novel happening...but then what would be the impetus for the reader to check out the other bad end timelines? But also what would be the impetus for them to read through all the different branch versions to find the true one, either? In the novel, it is a "game" where you have to solve problems/make decisions, but with version control there isn't much work to be done on the reader's part. Also how would I explain how to navigate the story to someone who isn't a programmer/uses GitHub?

My roommate is a programmer and I tried to talk about this with her and all she could say was "you're not supposed to use GitHub for that." I know!!! I am simply physically incapable of writing a normal story I guess.
 
  • Like
Reactions: Vemahk

Vemahk

Registered
Joined
Sep 9, 2021
Messages
8
Reaction score
5
Location
Somewhere in the Facinity of Beetlejuice
My roommate is a programmer and I tried to talk about this with her and all she could say was "you're not supposed to use GitHub for that." I know!!! I am simply physically incapable of writing a normal story I guess.
The medium is as much a creative element as the contents of the product, I say. Your roommate is right, of course, but I think you and I agree that isn't the point :p.

I've been thinking about this more, on and off, since I last posted. While not impossible, I believe now that attempting to use the GitHub revision history to manufacture some kind of branching timeline may not be ideal, for two main reasons:
1. At least in the "canonical" (lol?) use of GitHub, all changes are concurrent changes (i.e., within the same timeline) written by separate (usually) people.
2. In branching timeline stories, it is usually the beginning that is set, and choices branch out into possible futures. Because "single-head" nature of GitHub's branches though, it must be the end that is set in place, and it branches into the past. However, this conflicts with pretty much every timeline manipulating story that I've ever witnessed - how could there be multiple pasts to a single point in time?

Don't mistake me for telling you it couldn't be done, just I can't figure out how to do it.

My proposed revision would be, much like different programmers commit changes separately and merge their changes together into the final head of the branch, you write a single timeline from multiple perspectives, and as each character "writes" a piece of the story, other characters can "see" (through the merges in the branches) the story and react... Eh? Heck, this sounds very strange, even to me, but I believe it to be possible lol.

I guess, thinking about it some more (this could never end :ROFLMAO:), it could depend all on how you want the story to read. If you do want to do some kind of branching timeline story, you could do that: but you may have to write it backwards. The head of the branch could be the beginning of time instead of the end, so that reading backwards into the commit history reads you forward in time for the story... But you would have to plan before you wrote it into the repository so that you could write it backwards.

Also how would I explain how to navigate the story to someone who isn't a programmer/uses GitHub?
That, my friend, sounds like a UX question, which I am unqualified to answer :ROFLMAO:. In all seriousness, that did pose a problem to me in my original response, which is why I mentioned that "the audience would be small". You may be able to use the markdown to link to other files in other commits, but I have not tested this.

The main timeline would be the "default" one, where she makes (default? no?) decisions, and wouldn't get very far. So the main timeline would be the "original" timeline before she alters the HTML of reality.
When is it a good idea to make multiple posts instead of keeping on a mega one? Eh, whatever: sunk cost.

All of the above that I have written so far is under the assumption that you would be only using a single branch... While it is true that the "Release" branch is the "Production", (i.e., for all intents and purposes, final; public), and there is only one of those, you could maintain multiple branches which do branch into the future... And if you really wanted to have a fun time with time manipulation, you could merge them into each other... I don't know how I would work that narratively, though.

P.S.: "default", "main", "master": I think there's a holy war on that right now, but yeah default is correct enough (tm).
 

Vemahk

Registered
Joined
Sep 9, 2021
Messages
8
Reaction score
5
Location
Somewhere in the Facinity of Beetlejuice
Upon a cursory exploration of GitHub markdown documentation, there appears to be features to link to branches, commits, and files, but not files in a specific commit...

Which may be fine, because I realized during my last bit in my last post that my "single branch mindedness" may be an artifact of my heavy use of Mercurial (another version control software in competition with Git), which does not support the use of branches nearly as well as Git does. With Git, you may have better luck branching into the future than I was thinking. Sorry about flipping so much on this, but at least I'm getting some different ideas out there lol.
 

Vemahk

Registered
Joined
Sep 9, 2021
Messages
8
Reaction score
5
Location
Somewhere in the Facinity of Beetlejuice
Hold the phone! A slightly more in-depth check reveals: Permanent links to code!
You can create a permanent link to a specific line or range of lines of code in a specific version of a file or pull request.
That sounds exactly what I was looking for :unsure:. There you go: you could use permenant line links to link across commits/branches from your markdown files.
 

ChaseJxyz

Writes birds and bird accessories
Super Member
Registered
Joined
Jul 5, 2020
Messages
1,448
Reaction score
1,006
Location
The Rottenest City on the Pacific Coast
Website
www.chasej.xyz
This is all really awesome, thank you!!!

I knew from the start that there would be 2 repos for this: a pre-prod where I can run tests, and a public repo where I would copy/paste files from pre-prod so I can build the branches the way they need to be.

The one thing that really Gets Me is that there's no nice way to visualize this. What's been tattooed inside my brain whenever I think about this project (which means the interactive novel and this GitHub thing) is this flowchart that's used to document and help you move around the timelines of the game. I use LucidChart to document things (still in progress, there's at least 9 terminal endings), And "in-game" a table of contents will be built to show where you are/go forward or back (like in an eBook) or "sideways" (altering HTML and going to a different "timeline") (but that's easy to build with a finite state machine/an unordered list). There is *A* diagram of branches under insights > network but it's really tiny and off in a corner. So maybe I'll have to build one myself....maybe put links in it to other branches? Either way something I would manually have to build and that feels like a pain.

Git hub does have their drop-down thing for branches and I was *GOING* to complain about it but then I remembered that's exactly how Archive of Our Own has you navigate between chapters in a fic. But I still feel like it's really bad UX, I say as a person who can only design 1990s websites (well maybe not THAT bad. I know how to put a div with some padding around the <p> tags and give it a border so it looks nice and the whole screen isn't blinding white. But there a'int no JavaScript involved to make things pop in or whatever).
 

Elizabeth George's book Write Away