Live data from Hacker News

Learn Git Branching

pcottle.github.com

131–140 of 144 posts

Re: Learn Git Branching

#131
I thought I knew enough git, but the other day I was still able to lose my changes...

Suppose I'm in master and already modified a file, and now I notice that it would be better to work on a devel branch with those changes, so I could pull upstream changes from master and merge locally. I think I did something like this:

  git stash
  git checkout -b devel
  git stash apply
  git add file.txt
  git commit -m "XYZ new changes" 

  git checkout master
  git fetch
  git rebase origin/master (to avoid an empty merge, changes
                            upstream were in independent files)
  git merge devel (to get commit "XYZ")
In the end of this, I had lost my changes in file.txt.

Re: Learn Git Branching

#132

This is really well done. Nice job! Another direction you can go with this is to make a series of Git puzzles. Basically, starting with this diagram A, convert to diagram B in the least number of moves. To be extra useful, these could revolve around common Git pitfalls.

This is a fantastic idea! Just like chess puzzles, only for git. Would be a great deliberate practice tool.

Re: Learn Git Branching

#133
post #115

Earlier quoted context omitted.

Thanks for all the hard work! As a git noob, this is extremely useful to me. Thanks again! By the way, what are some recommended git GUIs for linux?

I love SmartGit. It runs on Mac OS X, Windows and Linux. http://www.syntevo.com/smartgithg/index.html

This. It's the only UI tool that I know that is powerful enough for everyday work, yet simple enough to understand for noobs because it can't do everything that Git can. Sometimes, you'll have to use the shell, still, if you're a power user. Which is fine!

Colour me impressed.

Re: Learn Git Branching

#135
post #30

shameless plug: www.srctree.net - Ace editor + git + canvas for viewing commits/branches. I 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!

totally do not understand what this should do. please give some intro...

I guess I need to rethink the whole layout. Under 'tips' there is a small explanation but might still be confusing. There's also a 'see an example' on the bottom, but I guess it's not that helpful either. Someone gave me a nice hint of doing a landing page with explanation and a huge 'start coding' button. I'll do that :)

Re: Learn Git Branching

#136
post #30

shameless plug: www.srctree.net - Ace editor + git + canvas for viewing commits/branches. I 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!

Interesting but how to get other code in there is not so clear. Could be useful as an educational tool, with nicer defaults.

I'm not sure I get it. You can start coding and just keeping on commiting and it will handle branching automatically. No doubts that I should make that clear somewhere.

Re: Learn Git Branching

#137
post #30

shameless plug: www.srctree.net - Ace editor + git + canvas for viewing commits/branches. I 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!

I just wish you could merge and rebase.

That would be one of the next steps. I just released an really simple MVP and got my head around other projects. I'm sure gonna refactor the thing eventually and make some things clearer.

Re: Learn Git Branching

#138

Seems only Chrome exists as a browser. All others need not apply.

Should work on Firefox, Chrome, and Safari. Anything specific you are noticing in another browser?? I rely pretty heavily on the box model for layout, but if you look at the CSS I included almost every browser extension (even Opera)

It doesn't really layout well in my version of Firefox (18.0.2) - see the output here: http://imm.io/WxqQ and here: http://imm.io/Wxr8

You can't see what's happening and the box seems to be improperly sized and spaced as well as problems with the terminal-style text editing window. The text flows off the bottom and cursor is misaligned: http://imm.io/WxrS

Re: Learn Git Branching

#139

Wow! Author here, did not expect this to get submitted to HN yet (was going to finish out a few more levels this weekend and clean everything up). Forgive the giant "TODO" in the help dialog The 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 got stuck on Level 2 - created a few more branches and I couldn't complete the level. Goal completion check should be more open for additional work done as long as the main goal is completed. Alternatively - some way of level reset should be provided. Anyway - this is great work!

Type "reset" into the terminal command line

Re: Learn Git Branching

#140

Earlier quoted context omitted.

Should work on Firefox, Chrome, and Safari. Anything specific you are noticing in another browser?? I rely pretty heavily on the box model for layout, but if you look at the CSS I included almost every browser extension (even Opera)

It doesn't really layout well in my version of Firefox (18.0.2) - see the output here: http://imm.io/WxqQ and here: http://imm.io/Wxr8 You can't see what's happening and the box seems to be improperly sized and spaced as well as problems with the terminal-style text editing window. The text flows off the bottom and cursor is misaligned: http://imm.io/WxrS

Same, here FF 18.0 on Ubuntu. Unusable.
Post reply on HN