TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The new X-Men movie explained in Git

169 pointsby hpvic03almost 11 years ago

16 comments

peterkellyalmost 11 years ago
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?
评论 #7852475 未加载
评论 #7852273 未加载
naileralmost 11 years ago
Also:<p><pre><code> apocalypse@eygpt$ git init touch README.md; git add README.md git commit -m &#x27;Build Pyramids&#x27;</code></pre>
评论 #7853148 未加载
maurobaraldialmost 11 years ago
Easy to explain cronology of new X-Men movie. I want to see you do the same with Primer!
评论 #7852007 未加载
potenchalmost 11 years ago
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.
progxalmost 11 years ago
Wrong title, &quot;Git explained in the new X-Men movie&quot; ;-)
e12ealmost 11 years ago
Nice intro to (advanced) git :-) If anyone else was curious about the state of bisect in mercurial (it&#x27;s been in standard mercurial for a while):<p><a href="http://mercurial.selenic.com/wiki/BisectExtension" rel="nofollow">http:&#x2F;&#x2F;mercurial.selenic.com&#x2F;wiki&#x2F;BisectExtension</a><p>As for git stash, the closest equivalent appear[1] to be the shelve extension (distributed with mercurial since 2.8, November 2013):<p><a href="http://mercurial.selenic.com/wiki/ShelveExtension" rel="nofollow">http:&#x2F;&#x2F;mercurial.selenic.com&#x2F;wiki&#x2F;ShelveExtension</a><p>However, as we&#x27;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:<p><a href="http://mercurial.selenic.com/wiki/MqExtension" rel="nofollow">http:&#x2F;&#x2F;mercurial.selenic.com&#x2F;wiki&#x2F;MqExtension</a><p>Also relevant:<p><a href="http://mercurial.selenic.com/wiki/EditingHistory" rel="nofollow">http:&#x2F;&#x2F;mercurial.selenic.com&#x2F;wiki&#x2F;EditingHistory</a> <a href="http://mercurial.selenic.com/wiki/MqTutorial" rel="nofollow">http:&#x2F;&#x2F;mercurial.selenic.com&#x2F;wiki&#x2F;MqTutorial</a><p>I&#x27;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:<p><pre><code> -479: Artaÿctes crucified (...) 1973: Wolverine wakes up in random bed 1973: Mystique kills Trask 1973: Mystique&#x27;s DNA stolen xx: Last mutant killed by sentinel </code></pre> (With every commit appending one or more lines).<p>That way we could use it as a nice way to compare work flows across scms... Who&#x27;s up for doing RCS?<p>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 &quot;broken&quot; state -- then one would only have to document the &quot;fixing&quot; part for different systems... Another alternative would be to convert (eg via mercurials git&#x2F;svn plugins -- but I don&#x27;t think they cover bzr, monotone and rcs...).<p>[1] <a href="http://selenic.com/pipermail/mercurial/2011-December/041164.html" rel="nofollow">http:&#x2F;&#x2F;selenic.com&#x2F;pipermail&#x2F;mercurial&#x2F;2011-December&#x2F;041164....</a>
smalleganalmost 11 years ago
This had the exact opposite effect on me of further explaining some Git features via the X-Men movie!
评论 #7852338 未加载
gghhalmost 11 years ago
I was expecting the picture of a shiny directed acyclic graph, what a let down
quiescealmost 11 years ago
Alternatively: Git&#x2F;version control explained in terms of time travel.
评论 #7851937 未加载
naileralmost 11 years ago
Also: the movie starts with a branch where nearly everyone dies, and Kitty Pride&#x2F;Bishop reverts a few commits.
评论 #7852325 未加载
collinjacksonalmost 11 years ago
Why did Wolverine regain his memory in the future?
评论 #7855164 未加载
评论 #7853159 未加载
评论 #7855067 未加载
Roboprogalmost 11 years ago
What, we didn&#x27;t get to use git annotate? I guess we don&#x27;t want to go assigning blame in such a complicated situation :-)
atommclainalmost 11 years ago
I understand that this is just for fun, but wouldn&#x27;t the rebase at the end require a force push to the remote?
RVijay007almost 11 years ago
You forgot the post-credit scene showing Apocalypse 5000 years ago in Egypt with his 4 horsemen! :-)
SergeyDruidalmost 11 years ago
So what about &quot;Lost&quot;?
评论 #7852160 未加载
评论 #7852267 未加载
rog3ralmost 11 years ago
wibbly wobbly timey commit.
评论 #7852084 未加载