very nice idea. when/if this supports git push i'll come back and play some more. i'm a total git noob, git makes me crazy and maybe this will help clarify things for me.
Learn Git Branching
21–30 of 144 posts
Re: Learn Git Branching
#22Earlier quoted context omitted.
I didn't even realise you could type "help". There definitely needs to be some sort of introduction prompt otherwise people (like me) are just gonna leave feeling like they've learned nothing. Still, nice idea.
Agreed. I'm like you and I was just committing, branching, and merging but learning nothing while clicking around. I'm glad I know now though because I can totally use a lesson on branching. I think branching in Git is one of the most misunderstood parts of Git. I can't tell you how many times I've almost screwed up a repo because I made some mistake merging branches and not pulling from the correct branch when worki…
Re: Learn Git Branching
#23Re: Learn Git Branching
#24How about letting me worry about that and continue anyway? What is the worst that could happen, I have to use a scrollbar?
Re: Learn Git Branching
#25Excellent work! I've wanted an easy way to explain git branching to people and from now on I'll point them to this.
Same! Sometimes I would like to introduce my coworkers to the amazing world of git, but it's hard to convince them without showing them a concrete example, this one is a pretty nice overview, and also useful for advanced users! I just got a better, more intuitive understanding of what detached HEAD really means thanks to it!
Re: Learn Git Branching
#26 git checkout -b bugFix
git commit
git checkout master
git commit
git merge bugFix master
And git branch bugFix
git commit
git checkout master
git commit
git merge bugFix masterRe: Learn Git Branching
#27The link everyone should see is the demo: http://pcottle.github.com/learnGitBranching/?demo
That shows a few example commands, the completion of a level, and finishes with the help dialog.
Some interesting technical highlights
- I made heavy use of javascript "Promises" to route control through the entire app. The source code has some nice examples, but it would be callback spaghetti without it
- You can import and export trees to share with your friends ("import tree" and "export tree" commands)
- You can build levels from within the app with "build level". The intro diaog should step you through the process
- It even supports interactive rebasing! Try it out with "git rebase -i HEAD~3"
Git is a fairly complex too that can be explained really well graphically. I never understood what I was doing until I saw diagrams in the git manpages and various books around on the internet. I wanted there to be an interactive form of these diagrams but it didn't exist --- so I built it.
9,000 lines of JS later I have this. There's still some polishing to be done, but I'd love for the community to share their knowledge about different git workflows and different ways to explain git concepts.
I tried to make the bar for contributing as low as possible. You can build a level and submit a pull request without even cloning the repo!
Re: Learn Git Branching
#28It would be great if the help page popped up when I first load the site, so I don't have to guess and type "help" at the prompt to find out the purpose of the site. :)
http://pcottle.github.com/learnGitBranching/?demo
Shows the help page, an example level, and the whole shebang
Re: Learn Git Branching
#29What is the difference between doing: git checkout -b bugFix git commit git checkout master git commit git merge bugFix master And git branch bugFix git commit git checkout master git commit git merge bugFix master
git branch bugFix
does not automatically check it out, so you'd have to follow it up with git checkout bugFix
but if you do git checkout -b bugFix
it will create the branch and then check it out all in one step.Re: Learn Git Branching
#30I built it about a year ago, mostly for learning and fun. I haven't advertised it a lot but it seems relevant in here. I hope it's not off topic!