* git-merge: need a tap with the cluestick, please
@ 2007-10-18 16:17 walt
2007-10-18 23:35 ` Shawn O. Pearce
0 siblings, 1 reply; 3+ messages in thread
From: walt @ 2007-10-18 16:17 UTC (permalink / raw)
To: git
I just tried my first local modification to Linus's tree, and I
can't get the merge to work. Maybe my whole approach is wrong?
I wanted start compiling the kernel out-of-tree, so I added my
own 'obj' directory at the top level.
I then got conflicts when trying to pull from Linus, so I added
my 'obj' directory to my toplevel .gitignore file and committed
the local change to my 'master' branch. (This is my only local
modification because I'm only tracking Linus, not developing the
kernel.)
Now when I pull from Linus the merge stops in the middle because of
conflicts with my .gitignore file <sigh>. Anything I try now with
git-merge tells me I can't do that in the middle of a conflicted
merge. Yes, I know that now, but what should I do instead?
I could move my 'obj' out-of-tree but then I wouldn't learn anything.
This has to be bone-head easy, but not for me :)
Clues most welcome.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-merge: need a tap with the cluestick, please
2007-10-18 16:17 git-merge: need a tap with the cluestick, please walt
@ 2007-10-18 23:35 ` Shawn O. Pearce
2007-10-19 1:00 ` walt
0 siblings, 1 reply; 3+ messages in thread
From: Shawn O. Pearce @ 2007-10-18 23:35 UTC (permalink / raw)
To: walt; +Cc: git
walt <wa1ter@myrealbox.com> wrote:
> Now when I pull from Linus the merge stops in the middle because of
> conflicts with my .gitignore file <sigh>. Anything I try now with
> git-merge tells me I can't do that in the middle of a conflicted
> merge. Yes, I know that now, but what should I do instead?
>
> I could move my 'obj' out-of-tree but then I wouldn't learn anything.
> This has to be bone-head easy, but not for me :)
How about putting the ignore for your obj dir in your own private
exclude file:
$ echo /obj >>.git/info/exclude
will cause Git to ignore an "obj" directory if it is found in the
top level of the repository. And since this file is not actually
tracked as part of the repository it will apply to all branches
in this repository and won't cause merge conflicts when upstream
makes changes to .gitignore.
As for aborting a merge that you have gotten into the middle of
decided you want to get out of, use `git reset --hard`. That will
throw away all of the unmerged state and put you back to your
pre-merge state.
--
Shawn.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-merge: need a tap with the cluestick, please
2007-10-18 23:35 ` Shawn O. Pearce
@ 2007-10-19 1:00 ` walt
0 siblings, 0 replies; 3+ messages in thread
From: walt @ 2007-10-19 1:00 UTC (permalink / raw)
To: git
Shawn O. Pearce wrote:
> walt <wa1ter@myrealbox.com> wrote:
>> Now when I pull from Linus the merge stops in the middle because of
>> conflicts with my .gitignore file <sigh>. Anything I try now with
>> git-merge tells me I can't do that in the middle of a conflicted
>> merge. Yes, I know that now, but what should I do instead?
>>
>> I could move my 'obj' out-of-tree but then I wouldn't learn anything.
>> This has to be bone-head easy, but not for me :)
>
> How about putting the ignore for your obj dir in your own private
> exclude file:
>
> $ echo /obj >>.git/info/exclude
>
> will cause Git to ignore an "obj" directory if it is found in the
> top level of the repository. And since this file is not actually
> tracked as part of the repository it will apply to all branches
> in this repository and won't cause merge conflicts when upstream
> makes changes to .gitignore.
Thanks to both you and Lars, who gave me the same advice off-list.
I will do exactly that.
Just to illustrate how much of life depends on blind luck, both good
and bad, I'll explain what really got me in trouble here. On the
very first pull from Linus after I added my obj directory to
.gitignore -- I pulled this commit:
commit 9e447a7f1fd997bcb9266899e777c37469245365
Author: Denis V. Lunev <den@openvz.org>
Date: Tue Oct 16 11:22:21 2007 +0400
.gitignore update for x86 arch
This patch: - makes .gitignore files visible to git
I'd like to think that if I'd made my changes on *any* other day
but yesterday I wouldn't have been so completely confused by what
happened. (But perhaps I flatter myself :o)
Thanks again.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-19 1:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-18 16:17 git-merge: need a tap with the cluestick, please walt
2007-10-18 23:35 ` Shawn O. Pearce
2007-10-19 1:00 ` walt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).