Re: FIX/COMMENT: git remote manual page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 22, 2010 at 8:15 AM, Michel Briand <michelbriand@xxxxxxx> wrote:
> Hello,
>
> I tried the example given at the bottom if the manual page of git
> remote.
>
> Â Â Imitate git clone but track only selected branches
>
> $ mkdir project.git
> $ cd project.git
> $ git init
> $ git remote add -f -t master -m master origin git://example.com/git.git/
> $ git merge origin
>
> It works like it is written.
>
> But it seems this does not work with my special setup:
> - I use GIT_DIR and GIT_WORK_TREE to specify another location for my
> Ârepository, and to work from another directory,
> - I name my remote with a custom name (not origin).

So you set GIT_DIR and GIT_WORK_TREE before running "git remote add"?

> It fails at the last command :
>
> Â Âfatal: <my name> - not something we can merge

It fails to see "<my name>" points to a commit. Maybe it fails to read
remote information from config..

> But if I try the command :
>
> Â Âgit merge <my name>/master
>
> the error message is different :
>
> Â Âfatal: This operation must be run in a work tree
> Â Âfatal: read-tree failed
>
> I cd to the work tree and issue the same last command.
> Then it works.

What git version are use using? I did

GIT_DIR=git/.git GIT_WORK_TREE=git git/git merge origin # or a specific branch

and it worked fine here (recent master). That message means work-tree
settings are not propagated to git-read-tree (run by git-merge).
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]