
Learn Git Branching - Dekku
http://pcottle.github.io/learnGitBranching/
======
zaius
Why is git so hard? Is it that it encapsulates concepts that are inherently
difficult to grasp? Or is it just that I need to think about things in a
different way? I still feel after 5 years of git use that I am useless with
it.

~~~
guard-of-terra
\- Its user interface is inconsistent and poorly designed.

\- It is an overkill for a small project with a central repository - what we
usually have, leading to a large conceptual overhead.

Why it became popular in the first place? a) Linus, b) It's pretty easy and
pain-free when you have a single-person project that doesn't branch much.

~~~
jkubicek
> It is an overkill for a small project with a central repository - what we
> usually have, leading to a large conceptual overhead.

I strongly disagree. All my projects use git and the majority of them are
small with a central repository.

As someone who learned Git and SVN at the same time, I think git has an
undeservedly bad reputation. There are many workflows where Git is much easier
to grasp conceptually (initializing a new repo, branching, how do I work on an
airplane?) I think people who are comfortable with SVN tend to forget that,
other than the confusion around staging, it's easier for rank beginners to
learn the basics of Git than the basics of SVN.

~~~
stared
If for someone Git is too hard then Mercurial is a great choice. Better
(safer, more powerful) than SVN and perhaps even - easier.

(Just now I am converting some scientific collaborators to use Mercurial for
small projects. Still, for code I use Git... but mainly because of GitHub.)

------
xxbondsxx
Hey everyone! Author of LGB here, wasn't aware this would go to the front page
again, sorry for not responding earlier.

Please check out the demo of the app if you haven't seen it yet:
pcottle.github.com/learnGitBranching/?demo

It explains most of the operatons and gives you a sense of how to start and
stop lessons.

I'm also working on getting lessons for origin commands (git push, pull,
fetch, etc). You can see a short demo of that functionality here:
[http://pcottle.github.io/learnGitBranching/?NODEMO&command=g...](http://pcottle.github.io/learnGitBranching/?NODEMO&command=git%20clone;%20git%20fakeTeamwork%202;%20git%20fetch;delay%202000;reset;%20git%20clone;%20git%20fakeTeamwork%202;%20git%20commit;%20git%20pull;git%20push;%20delay%202000;%20reset;%20git%20clone;%20git%20fakeTeamwork%202;%20git%20commit;%20git%20pull%20
--rebase;%20git%20push)

But a lot of it is broken still, so it's strictly a WIP

~~~
stared
I like it a lot, great work!

What I am missing though is:

\- examples and motivation,

\- commands on the right (to see them all the time and learn eventually), or
example files in the folder,

\- on the level-chooser - 'empty' for starting just with the command line
(e.g. for level-building).

That is it implicitly assumes that someone knows what are branches, why to use
them, when to use them (and when - not). E.g. 'lightweight' as a feature, not
- goal. Sure, this tutorial assumes some level... but if one is a master at
branching, then one does not need to learn it from a graphical tutorial.

------
andyhmltn
Why is this posted and upvoted on to the front page at least 3-4 times a
month? It's a great resource, but I don't think that warrants pushing other
stories down as it resurfaces so frequently.

~~~
xxbondsxx
I agree -- I'd rather come back every ~6 months with big updates rather than
have the link submitted constantly. I'm always planning to submit it myself
when I reach a big milestone but someone always beats me to it... it gets a
fair amount of organic traffic and Github switching to the .io domain for
pages probably made it fall through the cracks of the HN submission map.

That being said, I think I'll resubmit when I get the origin lessons in place
(WIP here:)
[http://pcottle.github.io/learnGitBranching/?NODEMO&command=g...](http://pcottle.github.io/learnGitBranching/?NODEMO&command=git%20clone;%20git%20fakeTeamwork%202;%20git%20fetch;delay%202000;reset;%20git%20clone;%20git%20fakeTeamwork%202;%20git%20commit;%20git%20pull;git%20push;%20delay%202000;%20reset;%20git%20clone;%20git%20fakeTeamwork%202;%20git%20commit;%20git%20pull%20
--rebase;%20git%20push)

And then hopefully I'll be out of everyone's hair forever.

------
AlexanderDhoore
I'm shocked at how awesome this is... My git-fu is not very strong. This is
great!

You can even make lessons to share with friends... That's amazing! Next step:
make user contributed lessons archive!

------
mazsa
FYI:
[http://news.ycombinator.com/item?id=5232415](http://news.ycombinator.com/item?id=5232415)

------
jafaku
So what do I do now?

[http://i.imm.io/1al4b.jpeg](http://i.imm.io/1al4b.jpeg)

~~~
rurounijones
On the off-chance that you are not trolling: The site requires JavaScript.

On the on-chance that you are trolling:

You go to the repository and raise an issue regarding the fact that there is
no obvious "This site requires JavaScript" message for those who access the
site without JS.

[https://github.com/pcottle/learnGitBranching/issues/107](https://github.com/pcottle/learnGitBranching/issues/107)

You're welcome.

~~~
jafaku
I haven't turned off Javascript. The site is broken.

~~~
morpher
It doesn't work for me in firefox on linux. But, works fine on chromium
(although it requires more vertical real-estate than my 13" laptop screen
has).

~~~
rurounijones
Works well on Ubuntu 12.04 with std Firefox 21.0 for me.

------
grimtrigger
I've struggled with git for years without ever feeling comfortable with it.
This looks like it is going to be really awesome. Thank you pcottle!

------
bellbind
Great stuff there, I actually learnt from what I thought was an interactive
tutorial for beginners. The commands (like 'reset' to go back to the beginning
of a level) are not that straightforward from the beginning though. Also I
haven't found how to actually see _your_ solution yet (not that I have really
searched for it, but it would be nice to have a big button).

------
goghvanmr
I never really understand git branching until I saw this cool website. Thanks
a lot.

------
rbellio
Level 3 Intro - Create a branch, checkout, commit, checkout master, commit,
merge. It says it can be done in five commands and I'm doing it in six
(following the above steps very closely). What am I missing?

~~~
xxbondsxx
git checkout -b will make the branch and check it out at the same time.

You can always use "show solution" to see what we are using as the benchmark.
Command discovery is a bit hard to communicate in this app -- I added the
helper bar at the bottom for the most common commands but I only have so many
pixels...

~~~
rbellio
Thanks.

------
talles
Very useful. Used in a Git presentation I gave.

~~~
xxbondsxx
Oh really? Nice! Was it an academic setting or a professional one?

I am working on origin lessons right now (see link above) but I could actually
make a file staging version if necessary. What other gaps of knowledge do you
think it could fill?

~~~
diego898
Im actually going to use this in a presentation Im giving to my research lab
as well. I tried to do something similar by drawing on the board but this is
BY FAR one of, if not the, BEST tutorial I have ever seen. Actually seeing the
images created and change in real time is worth 1 million words explaining
them. Thank you so much!

------
rob22
It Really Awesome as well very usefull too....

------
vanwilder77
Woww..! I just learned Git branching. Used Git for 2 years, but never really
bothered to learn more!

Awesome stuff

------
anton_gogolev
So judging by the number of Git-related posts here on HN I can assume that Git
has taken over. Sad, but true.

~~~
chris_wot
You've been downvoted... but seriously, why is this such a bad thing?

~~~
arctangent
Git is too complicated for most use cases, but seems to be becoming a de facto
standard for even the simplest collaborative tasks.

~~~
revscat
I use it both for personal projects that will never have another human look at
them, as well as for large multi-user projects.

In what was is it too complicated for most use cases? Most use cases involve
"code being worked on by multiple people", in which case it has seen great
success.

------
goghvanmr
every time I completed a level, my Safari crashed... Environment: Mac OS X
10.8

------
julien421
This is very nice! GG!

