[Kde-scm-interest] Git roadmap

Thiago Macieira thiago at kde.org
Tue Sep 18 08:40:20 CEST 2007


Mickael Marchand wrote:
>hmm my git knowledge is still poor, do you mind explaining the
>difference between push/fast-forward-only ?

A fast-forward is when you do something that adds revisions (push, pull, 
merge, rebase, etc.) but all revisions that you're adding are direct 
descendants of the latest revision (HEAD) you have.

If you have commits:
   A--->B--->C--->D

and you merge the tree:
   A--->B--->C--->D--->E--->F--->G

then "merge G" is a fast-forward.

In the context of a push to the server, it's like we're used to in 
Subversion: you can only push if your working copy is up to date. Unlike 
Subversion, you must have the very latest commit, not just on the files 
you're touching.

To compare: a non-fast-forward push would mean you're erasing commits from 
history. If, after your operation, the tree above became:
   A--->B--->C--->K--->L--->M--->N

it's a non-fast-forward because D disappeared. You may ask: why would you 
want to do that? Well, you may want to reorder commits. If you want to 
have:
   A--->B--->C--->G--->D--->E--->F

then, even though it's the same diff between commits, since the order 
changed, they are different commits from git's point of view.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-scm-interest/attachments/20070918/17f4919e/attachment.pgp 


More information about the Kde-scm-interest mailing list