git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FIX/COMMENT: git remote manual page
@ 2010-12-22  1:15 Michel Briand
  2010-12-25 10:48 ` Nguyen Thai Ngoc Duy
  0 siblings, 1 reply; 4+ messages in thread
From: Michel Briand @ 2010-12-22  1:15 UTC (permalink / raw)
  To: git

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).

It fails at the last command :

    fatal: <my name> - not something we can merge

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.

I suspect the first error message is related to the remote name. And
the second to the work tree not being the current directory.

Cheers,
Michel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-25 13:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-22  1:15 FIX/COMMENT: git remote manual page Michel Briand
2010-12-25 10:48 ` Nguyen Thai Ngoc Duy
2010-12-25 11:41   ` Michel Briand
2010-12-25 13:00     ` Nguyen Thai Ngoc Duy

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).