git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Forcing git top-level

From
CGCedric Gava <gava.c@free.fr>
Date
Mar 31, 2015, 09:25 UTC
Message-ID
<0FD999DB-3DBF-40D4-8128-715BDC49EAAB@free.fr>
Hello

I’ve copied a .git folder located at the root (/) of a filesystem, into another directory (/home/mydir). If I issue a git rev-parse —show-toplevel I got "/"... I would like to change the top-level to point to /home/mydir.

I’ve also tried to bare clone the original .git folder, but the new git repo stills points it top-level to "/".
Thank you for your answer

Best regards Cedric

Next: Jeff King
Message 1 of 11 in “Forcing git top-level”
  1. Cedric GavaMar 31, 2015
  2. Jeff KingMar 31, 2015
  3. init: don't set core.worktree when initializing /.gitJeff King, Mar 31, 2015
  4. Jonathan NiederMar 31, 2015
  5. init: don't set core.worktree when initializing /.gitJeff King, Apr 2, 2015
  6. Jonathan NiederApr 2, 2015
  7. t1509: update prepare script to be able to run t1509 in chroot againNguyễn Thái Ngọc Duy, Apr 3, 2015
  8. Jeff KingApr 3, 2015
  9. Duy NguyenApr 3, 2015
  10. Junio C HamanoApr 11, 2015
  11. t1509: update prepare script to be able to run t1509 in chroot againNguyễn Thái Ngọc Duy, Apr 18, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.