

The new X-Men movie explained in Git - hpvic03
http://hashrocket.com/blog/posts/x-men-days-of-future-past-explained-in-git

======
peterkelly
Except you've thrown away everything that's happened since 1973, some of which
you may still want. There's going to be a lot of awful lot of manual conflict
resolution to handle - or is there a "world" script that can be run off the
new HEAD that plays out the series of events that result from the sentinels
being prevented?

~~~
rjvir
I think the idea is that you don't have access to the other timeline, because
none of the characters should. All that's left of the dark timeline is in
Wolverines's head, which is accounted for!

~~~
baddox
So Wolverine at the end of the film wouldn't remember anything that happened
to him (and his body) between 1973 and the present in the new timeline which
he created, right? He would just remember his original timeline, plus the
stuff that we see him do in the film.

You see that in the film, where he meets some characters he previously knew
but didn't expect to see. But we don't see the other side of this: there are
surely characters in the new timeline that Wolverine is very close to that he
will have no memory of. I guess that sucks for those characters.

~~~
qbrass
>I guess that sucks for those characters.

Wolverine's return to the new future essentially kills off the one that had
been living in that timeline since 1973 and nobody cares.

~~~
noblethrasher
But, there's a nice narrative symmetry because he had missing memories when he
was first introduced way back in _X-Men_.

------
nailer
Also:

    
    
        apocalypse@eygpt$ git init
    
        touch README.md; git add README.md
    
        git commit -m 'Build Pyramids'

~~~
kitwalker12
LOL...

    
    
      git remote add horseman1 git@github.horseman1/apocalypse.git
      git remote add horseman2 git@github.horseman2/apocalypse.git
      git remote add horseman3 git@github.horseman3/apocalypse.git
      git remote add horseman4 git@github.horseman4/apocalypse.git

------
maurobaraldi
Easy to explain cronology of new X-Men movie. I want to see you do the same
with Primer!

~~~
hpvic03
Haha now that would be a challenge

~~~
kemayo
Though in large part it's a challenge because we only see hints at some of the
timelines, so we'd have to make guesses and leave some placeholder branches
in...

------
potench
I think you should mention that 1973 wolverine enlists young punk Quicksilver
(1000x developer) who force pushes a ton of undocumented, yet amazing,
features with little to no commit messages, then sadly disappears.

------
progx
Wrong title, "Git explained in the new X-Men movie" ;-)

------
e12e
Nice intro to (advanced) git :-) If anyone else was curious about the state of
bisect in mercurial (it's been in standard mercurial for a while):

[http://mercurial.selenic.com/wiki/BisectExtension](http://mercurial.selenic.com/wiki/BisectExtension)

As for git stash, the closest equivalent appear[1] to be the shelve extension
(distributed with mercurial since 2.8, November 2013):

[http://mercurial.selenic.com/wiki/ShelveExtension](http://mercurial.selenic.com/wiki/ShelveExtension)

However, as we'll be needing to do a bit of history editing, we might want to
just go straight for the (also bundled with mercurial) queues extension:

[http://mercurial.selenic.com/wiki/MqExtension](http://mercurial.selenic.com/wiki/MqExtension)

Also relevant:

[http://mercurial.selenic.com/wiki/EditingHistory](http://mercurial.selenic.com/wiki/EditingHistory)
[http://mercurial.selenic.com/wiki/MqTutorial](http://mercurial.selenic.com/wiki/MqTutorial)

I'm a little tempted to redo this for mercurial, just to look at the
differences -- but the first order would be to create an actual repo -- say
just a file with timestamps and events:

    
    
        -479: Artaÿctes crucified
        (...)
        1973: Wolverine wakes up in random bed
        1973: Mystique kills Trask
        1973: Mystique's DNA stolen
        xx: Last mutant killed by sentinel
    

(With every commit appending one or more lines).

That way we could use it as a nice way to compare work flows across scms...
Who's up for doing RCS?

Come to think of it, as the initial series of commits are linear, they could
be specified in some linear fashion (yml maybe) -- and then replayed to create
the initial "broken" state -- then one would only have to document the
"fixing" part for different systems... Another alternative would be to convert
(eg via mercurials git/svn plugins -- but I don't think they cover bzr,
monotone and rcs...).

[1]
[http://selenic.com/pipermail/mercurial/2011-December/041164....](http://selenic.com/pipermail/mercurial/2011-December/041164.html)

------
smallegan
This had the exact opposite effect on me of further explaining some Git
features via the X-Men movie!

~~~
stcredzero
Ellen Page actually played Gitty Pryde.

------
gghh
I was expecting the picture of a shiny directed acyclic graph, what a let down

------
quiesce
Alternatively: Git/version control explained in terms of time travel.

~~~
hpvic03
That is also accurate.

------
nailer
Also: the movie starts with a branch where nearly everyone dies, and Kitty
Pride/Bishop reverts a few commits.

~~~
hpvic03
That's funny. My friend just told me this too -- I got to the theater about 5
minutes late.

------
collinjackson
Why did Wolverine regain his memory in the future?

~~~
baddox
(In case it's not a given, spoilers for Days of Future Past below.)

He didn't. He just has all his memories from the original timeline (e.g.
previous X-Men and Wolverine films), plus the events he experienced during
Days of Future Past. He has no memory of what happened to him between 1973 and
the present in the new timeline (which he created). That's why he's surprised
to see a few characters at the end of DoFP. He remembers them from the
original timeline, but he also remembers them dying in the original timeline.
What would be much stranger is if they had never met him in the new timelines
(in which case he would remember them but they wouldn't know him), or if he
had met someone in the new timeline but not the original timeline (in which
case they would know him but he would have no memory of them).

------
Roboprog
What, we didn't get to use git annotate? I guess we don't want to go assigning
blame in such a complicated situation :-)

------
atommclain
I understand that this is just for fun, but wouldn't the rebase at the end
require a force push to the remote?

------
RVijay007
You forgot the post-credit scene showing Apocalypse 5000 years ago in Egypt
with his 4 horsemen! :-)

------
SergeyDruid
So what about "Lost"?

~~~
technoweenie
Whatever happened, happened. There's no rebasing involved. There's just a lot
of jumping around to various tags at different points in time.

------
rog3r
wibbly wobbly timey commit.

~~~
mnw21cam
Do you mean timey wimey? <shudder>

~~~
Roboprog
Where did Torvalds get that screwdriver?!?

~~~
stcredzero
Someone should name a tool timey wimey.

