[Twisted-Python] github, again

meejah meejah at meejah.ca
Sat Jun 8 23:23:57 MDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jonathan Ballet <jon at multani.info> writes:
> On Tue, Jun 04, 2013 at 09:55:19PM +0100, Terry Jones wrote:

>> But, I believe this is what git rebase is mainly used for. You can
>> rebase your branch against an updated master and (I'm guessing)
>> make your changes look like a single diff. Some people don't like
>> that as it changes history, others do like it and say yes, that's
>> the point - clean up the history so the commit log isn't full of
>> tiny changes that were all made in order to effect some change
>> (i.e., address a given ticket/issue).

> This is actually called a "squash" in Git terminology - Git has an
> option called "--squash" for the "merge" command which precisely do
> that.

You *can* use "git rebase" to re-write a branch to look like all the
commits were in one (or be more selective, like take one out and
squash three together) -- or you can use the --squash option Jonathan
mentions during an actual merge. Basically, you're rebasing a branch
onto itself -- instead of using rebase to change the branch
point. This latter is a much nicer replacement for what people using
Subversion would call "mering trunk back into my branch" and IMO
more-closely matches what you usually mean: please pretend I branched
off trunk more recently, as I'd really like all those changes now so I
can fix the conflicts...

The rebase way of squashing does re-write the commits. For fun times,
look into "git rebase --interactive" (or as this guy calls it, ``a bit
like git commit --amend hopped up on acid and holding a chainsaw''):

http://tomayko.com/writings/the-thing-about-git

- -- 
meejah
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJRtBFwAAoJEJ0UOBRRgEVQpqYH/366F/9a8GkMxdnqItRTghZY
U/3AgjmYFpZmv14TM06QWAoX9RedzwASOq+x2J8Fiin+u2HPp8MUhrd0kcV7mvET
liyVnYA1v3xKParyS2mM0se0zc2pzQ6QileFYVBXMsmHhZndUPj7AlvNltDD9cXO
UJ7Ex0/eQQbKAybzbY5rSmNuYj01I0FNtfrfSvAHL1I2U4GtwH55lR5GTdEe2agk
WRFyqZgMDDe1e2bWJOYxoA7ZRUKdpgTUXKYWG4W/8uX4YrjBPkIQEZtL5Xu3qAGv
qNfAMhGkN0OLdBhhGpDsJrpsfTaSXW4CwlJSUZsg6fLSAqfe9lF0b0A5iNAscuY=
=K6gl
-----END PGP SIGNATURE-----



More information about the Twisted-Python mailing list