git fetch --rebase to have a linear history
Mildred Ki'Lya
ml.mildred593 at gmail.com
Sun Sep 6 23:47:41 UTC 2009
Hi,
Sometimes we work on the repository at the same time as someone else.
And when we run git fetch, a merge happens. Often, it is only for one
commit, almost nothing. But the history becomes non linear (which is not
so interesting to have.
To see an example, run the following command on the compiler repository:
gitk af8653371f44b285cea456e63b4eca2fabc7ff12
In those cases, when the changes you have locally haven't been published
anywhere, you can rebase your changes instead of merging them. It will
take a diff of all your local commits, and apply them on top of the
branch published on the internet.
The only problem is that it changes the SHA1 of the commits, but if they
are local that's not a problem.
And it makes history linear.
To do so, instead of running git fetch that automatically do a merge,
you can run
git fetch --rebase
I think that would be great.
Of course, sometimes a merge might be more appropriate (many local
commits for example)
Mildred
--
Mildred Ki'Lya
╭───────── mildred593@online.fr ──────────
│ Jabber, GoogleTalk: <mildred at jabber.fr>
│ Website: <http://ki.lya.online.fr> GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/lisaac-devel/attachments/20090907/72027f8a/attachment.pgp>
More information about the Lisaac-devel
mailing list