
Terminal game to test Git skills - jackpirate
https://github.com/hgarc014/git-game
======
skrebbel
I recognize that this is hardly a constructive comment, but it still bothers
me that "Git skills" are a thing. I want to keep my code versioned and share
them with my colleagues. There's no "Dropbox skills" game either, why do we
need a "Git skills" game? There _has_ to be a way to do what 90% of people use
Git for, but then simple, right?

~~~
wldlyinaccurate
I understand the sentiment, but Git is hardly meant to be a simple tool that
anybody can pick up and use without any prior experience. I don't use Git just
to version and share my code -- I'd use Dropbox if that were the case. No, I
use Git because I want to perform complex operations on a directed acyclic
graph which represents the history and structure of my project. I use it
because it can be interacted with in a programmatic way, and extended to meet
my needs. Git is _supposed_ to be complicated, and you _do_ need "Git skills"
to use it properly.

~~~
skrebbel
> _No, I use Git because I want to perform complex operations on a directed
> acyclic graph which represents the history and structure of my project._

To accomplish what? Note, I'm not trying to diss you, I really want to
understand why you want to do that.

I mean, I never woke up in the morning and said "woa, I really want to perform
complex operations on an acyclic graph today". Maybe you and me are just
different, but I usually want to make software, together with my team.

I want to hack on the same software as them at the same time, so we need a way
to deal with all the technicalities that make emailing ZIP files around
unpractical. I want to keep track of history so that I can see why we did what
when, and so that I can undo stupid mistakes. That's really all I want.

I don't completely understand why I _consciously_ need to perform complex
operations on a directed acyclic graph to accomplish these things, but somehow
that what I end up doing, and that makes me sad. I find it to be a horrible
distraction. For me, the "D" in DVCS is an implementation detail, and I bet
this holds for 90% of GitHub's paying customers.

~~~
wldlyinaccurate
Sorry, I've just realised how snarky my comment came off as.

I guess the point I was trying to make is that a huge portion of Git users
don't actually need Git; they would probably get everything they need from a
conceptually simpler VCS like Mercurial or SVN.

Regarding the DAG thing, this is just because that's essentially how Git
actually represents the objects which it stores, which represent your
repository and its history. A lot of the time I'm in the mindset of
"committing some code to a branch" but sometimes it's useful for me to get
into DAG-mode so that I can more easily think about how I want my repository
to be structured.

An example is how I work with my master branch, which I consider to be the
absolute source of truth for a repository's history. This means that it should
be full of complete, atomic commits which are ordered in a way that enables me
to do things like git-bisect (for finding bugs), generate meaningful release
logs, and just generally understand the history at a glance. So rather than
just blindly merge my branches into master, I spend a lot of time using git-
rebase to squash, re-order, and edit my commits. I find it easier to do this
when I'm thinking in terms of a DAG, rather than some abstract concept of a
"commit" (whatever that is).

------
djcapelis
I got to the point where it wanted me to run a shell script without examining
its contents... and that's where I just stopped.

Also, I didn't use git to do any of it, but maybe that's because I'm a
terrible person.

~~~
w00kie
Yeah, I had to cheat on that part and check out the file content. No way I'm
running it without looking.

------
rahij
Anybody stuck on this? -Sn The Next Clue Is: YtrydjKsYqebDoI3h bTINUeV6
pTVY8jnK2re HRwwNy25Ps6 u0YChCo5Jtw N3xkH3G nx aGo6yQTW RVZMsf3xk tBL0sG9GAR
HQbyGYdqs i6dx1fyIPGJVciz8Z1NzdrvGE CKgkFauXqfKJmas cDLerWvBTRzUikmP2
0sqk2Xhie2DcIv KtCyYTlNx7WxJp6A2yox3r aJX4r7FpUhgsyGIwc
prCCNx46GKVgzaerab3gXS7ieoOf1 Jp +Sn The next clue is: YtrydjKsYqebDoI3h
bTINUeV6 pTVY8jnK2re HRwwNy25Ps6 u0YChCo5Jtw N3xkH3G nx aGo6yQTW RVZMsf3xk
tBL0sG9GAR HQbyGYdqs i6dx1fyIPGJVciz8Z1NzdrvGE CKgkFauXqfKJmas
cDLerWvBTRzUikmP2 0sqk2Xhie2DcIv KtCyYTlNx7WxJp6A2yox3r aJX4r7FpUhgsyGIwc
prCCNx46GKVgzaerab3gXS7ieoOf1 Jp

~~~
emerongi
I had two lines displayed after I diffed. I could read the answer from there.

~~~
w00kie
what do you diff it with?

~~~
rahij
just realised I need to diff with origin/bug. Finished the game now :)

------
jimmyboyb
You can also try this one, its been around a while -
[https://github.com/Gazler/githug](https://github.com/Gazler/githug)

------
w00kie
I'm stuck at this clue though...

The next clue is: YtrydjKsYqebDoI3h bTINUeV6 pTVY8jnK2re HRwwNy25Ps6
u0YChCo5Jtw N3xkH3G nx aGo6yQTW RVZMsf3xk tBL0sG9GAR HQbyGYdqs
i6dx1fyIPGJVciz8Z1NzdrvGE CKgkFauXqfKJmas cDLerWvBTRzUikmP2 0sqk2Xhie2DcIv
KtCyYTlNx7WxJp6A2yox3r aJX4r7FpUhgsyGIwc prCCNx46GKVgzaerab3gXS7ieoOf1 Jp

~~~
volent
same here :(

------
lxe
This is very well done!

------
hybridtupel
Looks promising, but did I read correctly "each one harder than the next"? ;)

------
danra
Nice, looking forward to the sequel ;)

By the way, let's say I don't "remember" which other branch contains a file at
a certain path - what's the easiest way to find all other branches which
contain a file at that path?

------
mbubb
Ah - how do I make sure that cpp file is safe before running a shell script
which I am not supposed to read with it as an arg? (I mean this in practice -
not in the course of this game)

~~~
mbubb
And posting thsi here is a mistake... ;)

[https://github.com/hgarc014/git-
game/issues/2](https://github.com/hgarc014/git-game/issues/2)

~~~
hgarc014
this issue has been fixed

------
Aissen
I kind of ruined it with my reflex to run "git branch -a" (DO NOT run this
command if you want to play fairly); but I was able to complete it fairly
quickly nonetheless.

------
finalight
I can't even get the first one...what's the answer for the first one? i
thought it's "new"?

~~~
phaemon
Run "git log" and you'll see the commit messages. Checkout the commit that
makes you think of a "new programmer"

------
altoz
Fun game. Just finished.

May I suggest a part 2? It can include rebasing, cherry-picking, stashing and
resetting, among other things.

------
liviuchircu
Great game! We should make a "bash skills" game for you in return, Henry!

------
manojlds
> Clone this repository by running

What if I didn't know how to git clone? :)

------
kokonotu
I thought I was decent with Git and I fail the first task :(

~~~
kokonotu
nvm I got it

------
chinchang
Neat idea to test GIT skills :D Gr8 wrk!

------
phatak-dev
Really nice game.

