News for hackers. Stuff that matters.
Re:Git Is Simpler Than You Think by watmough on Wednesday September 07, 2011 @03:46PM (#2971098)
So if I have branched from master, onto experimental, and made several experimental changes that I want to actually use, then I can simply type:

    git merge master
    git branch master
from the tip of my experimental branch, and master will be moved up to the tip of the tree?
Re:Git Is Simpler Than You Think by natep on Wednesday September 07, 2011 @11:26PM (#2972510)
fr0sty was definitely not tactful, but his commands are correct. Merge always brings the branch you specify onto the commit you are currently on. The branch command either lists branches (when no other arguments, only certain options, are specified) or creates branches. Checkout is the command used to move around between commits in your repository.

Branching and merging is covered pretty well by Pro Git[1]

[1] http://progit.org/book/ch3-2.html

Re:Git Is Simpler Than You Think by fr0sty on Wednesday September 07, 2011 @04:55PM (#2971399)
Not at all. Where did you come up with that? That would merge in any commits in master not already in experimental and the next command would fail because a branch 'master' already exists.

To do what you are describing you would do this (or something similar:

    git checkout master; git merge experimental
Re:Git Is Simpler Than You Think by watmough on Wednesday September 07, 2011 @11:42PM (#2972542)
Thanks, obviously I'm missing some concept somewhere.
Re:Git Is Simpler Than You Think by rahoulb on Thursday September 08, 2011 @09:07AM (#2973728)
The checkout command moves you off the experimental branch and back onto the master branch.

The merge command then takes the commits in experimental that aren't in master and puts them into master.

Re:Git Is Simpler Than You Think by watmough on Thursday September 08, 2011 @11:54AM (#2974365)
Thanks, I think I may have been misusing

    git branch [some name]
I'll take a look at some of the suggested tutorials again. Thanks all. That said, I pretty much do straight-ahead main-line development, so this isn't a huge problem right now. I do most of my development after midnight, so there isn't a huge cognitive headroom left...
Re:Git Is Simpler Than You Think by losvedir on Thursday September 08, 2011 @08:50AM (#2973673)
I'm still just getting the hang of git, but I've found this best practices[1] tutorial the most handy to just get started. I needed to play around at this basic level before any of these other more complicated comments started to make sense. Check it out, it's very short.

[1] http://ariejan.net/2009/06/08/best-practice-the-git-developm...