So I have been learning about Git this weekend. It has some really nice-looking features for sure -- some things Mercurial doesn't have.
I was getting interested in switching, until I found what I consider a big problem.
Many projects that use git require you to submit things using git-format-patch instead of pushing/pulling from you. They don't want your merge history.
git-format-patch, though, doesn't preserve SHA1s, nor does it preserve merges.
Now, say we started from a common base where line 10 of file X said "hi", I locally changed it to "foo", upstream changed it to "bar", and at merge time I decide that we were both wrong and change it to "baz". I don't want to lose the fact that I once had it at "foo", in case it turns out later that really was the right decision.
When we track upstream changes, and submit with git format-patch, the canonical way to merge upstream appears to be:
git fetch; get rebase origin/master
Now, problem with that is it loses your original pre-conflict code on a case like this.
There appears to be no clean way around that whatsoever. I tried a separate "submission" branch, that rebases a local development-with-merge branch, but it requires a ton of git rebase --skip during the rebase process.
Thoughts?
Comments
Thu, 09.10.2008 15:39
Well said John! I read your bl og from Planet Haskell, but as a young voter I agree with yo u 100%. Thanks for the e [...]
Sun, 05.10.2008 20:40
There is no denying that there have been plenty of people th at have killed in the name of Christianity. That does [...]
Sun, 05.10.2008 18:34
I think the formula you wanted is git format-patch $(git rev-list HEAD | tail -1)
Sun, 05.10.2008 14:23
I know it sounds nice to you, but, Christianity means an opp ressive, theocratic, brutal, b loody regime to many of [...]
Sat, 04.10.2008 23:47
I agree that there must be sen sible limits on government exp enditure, for sure. Healthc are is one of those wher [...]
Sat, 04.10.2008 23:43
Not at all, and I completely a gree with you. But I wanted to stress that part, because not everyone does.
Sat, 04.10.2008 23:41
Hi Cliff, I agree with you that the "they take jobs Ameri cans won't" argument doesn't m ake sense. I also agree [...]
Sat, 04.10.2008 17:26
I always worry when people cla im their ethics are founded on religious tenets, since most religions have a lot of [...]