from time to time, I'll work on stuff and merge it into master, so you'll want stuff in there, so here's what you do:
2009-02-03 03432, 2009
aCiD2
`git checkout master`, then `git pull upstream` - this should not create a merge of any sort, merely update your work
2009-02-03 03459, 2009
aCiD2
then, go back to your branch - `git checkout start-work-on-x` and then bring it up to date with the latest work in master, `git rebase master`
2009-02-03 03409, 2009
brianfreud
so I'd be essentially forking myself, then switching back to your main?
2009-02-03 03413, 2009
aCiD2
this doesn't cause any merges at all, but has all the benefits of branching :)
2009-02-03 03428, 2009
aCiD2
brianfreud: yes, but the key bit is that you're rebasing, not merging, to stay up to date
2009-02-03 03442, 2009
brianfreud
difference is?
2009-02-03 03458, 2009
aCiD2
rebase is like picking up your work from the first commit, then moving it up to the latest commit on master
2009-02-03 03425, 2009
aCiD2
now there is one snag - you can't make your work public while you do this, because rebasing destroys and recreates commits
2009-02-03 03438, 2009
brianfreud
ie, files from checkout X are still changed, but I'm not re-commiting them in a difference checkout
2009-02-03 03414, 2009
aCiD2
brianfreud: basically, if I make 3 commits, that cause 3 conflicts, then you'll have to fix the conflicts on a commit by commit (so you fix the conflict exactly where it happened)
2009-02-03 03426, 2009
aCiD2
which, imo is pretty friggin sweet :P
2009-02-03 03433, 2009
brianfreud
sounds exactly like what I've been doing...
2009-02-03 03454, 2009
aCiD2
sure, but you've been using pull, which causes a merge
2009-02-03 03404, 2009
luks
aCiD2: except you need to resolve them every time you rebase
2009-02-03 03411, 2009
aCiD2
luks: no you don't
2009-02-03 03418, 2009
aCiD2
once you rebase, you're at master, that won't change
2009-02-03 03429, 2009
aCiD2
if I add more conflicts, sure, they'll need to be fixed, but that's the same for a merge
2009-02-03 03408, 2009
aCiD2
brianfreud: the argument for rebase and merging isn't the most key, the most key is making your changes isolated into branches. Think of a branch (in git) as being the work done on a ticket in track
2009-02-03 03424, 2009
aCiD2
(in fact, when I work from trac, that's exactly what I do - branch for every ticket I work on)
2009-02-03 03448, 2009
brianfreud
ok, so I go to work on "thingX", git checkout -b "thingX"
2009-02-03 03456, 2009
aCiD2
yup
2009-02-03 03407, 2009
brianfreud
now I finished working on thingX, I want to work on thingY, git checkout -b "thingY"
2009-02-03 03426, 2009
brianfreud
how would I switch back to working on thingX again?
2009-02-03 03437, 2009
aCiD2
and if, while you work on thingX, you decide to work on unrelated thingY, you would `git checkout -b thingY master`
2009-02-03 03452, 2009
aCiD2
important that you branch from master, by default you'd branch from thingX, and have a branch of a branch :)
2009-02-03 03404, 2009
aCiD2
brianfreud: `git checkout thingX`
2009-02-03 03416, 2009
aCiD2
git checkout moves between branches, with -b it just means 'create a new branch and then move to it'
2009-02-03 03430, 2009
brianfreud
so I should have, minimally, an i18n branch and a js branch, then be branching out from those 2?
2009-02-03 03435, 2009
aCiD2
hmm, you wouldn't branch off those 2 - but you should have those branches as separate
2009-02-03 03429, 2009
brianfreud
why wouldn't I be branching, say, "GC" from "JS" from master?
2009-02-03 03432, 2009
aCiD2
contextual example - you want to work on guess case, git checkout -b guess-case master
2009-02-03 03440, 2009
aCiD2
because there's not really any point
2009-02-03 03451, 2009
brianfreud laughs at http://bugs.musicbrainz.org/changeset/11184 :D
2009-02-03 03451, 2009
aCiD2
the JS branch would just have loads of subbranches - so you might as well remove the indirection
2009-02-03 03405, 2009
FauxFaux
I'm not going to say it.
2009-02-03 03416, 2009
aCiD2
FauxFaux: what?
2009-02-03 03422, 2009
FauxFaux
Nothing at all.
2009-02-03 03424, 2009
aCiD2
brianfreud: i was hoping it wouldn't be /that/ big
2009-02-03 03443, 2009
brianfreud
well, we did essentially rewrite every single template...
2009-02-03 03451, 2009
aCiD2
I know
2009-02-03 03424, 2009
aCiD2
ah damn, I forgot to revert one file
2009-02-03 03438, 2009
brianfreud
install.TT ?
2009-02-03 03443, 2009
aCiD2
no, statistics.pm
2009-02-03 03451, 2009
aCiD2
that removes all the functionality that rob moved into news.pm