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

[PATCH] Use .git/remote/origin, not .git/branches/origin.

From
Junio C Hamano <junkio@cox.net>
Date
Aug 20, 2005, 18:25 UTC
Message-ID
<7vzmrclb37.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vvf20o4sp.fsf@assigned-by-dhcp.cox.net>

Now multi-head fetch is complete, let's migrate the default configuration for new repositories created with the "git clone" command.

The original $GIT_DIR/branches is not deprecated yet, but create remotes directory by default from the templates as well.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 git-clone-script    |    8 +++++---
 templates/remotes-- |    1 +
 2 files changed, 6 insertions(+), 3 deletions(-)
 create mode 100644 templates/remotes--
8ad3e7efb406377f6903171638c70b7d566254c5
diff --git a/git-clone-script b/git-clone-script
--- a/git-clone-script
+++ b/git-clone-script
@@ -127,6 +127,8 @@ yes,yes)
 esac
 
 # Update origin.
-mkdir -p "$D/.git/branches/" &&
-rm -f "$D/.git/branches/origin" &&
-echo "$repo" >"$D/.git/branches/origin"
+mkdir -p "$D/.git/remotes/" &&
+rm -f "$D/.git/remotes/origin" &&
+echo >"$D/.git/remotes/origin" \
+"URL: $repo
+Pull: master:origin"
diff --git a/templates/remotes-- b/templates/remotes--
new file mode 100644
--- /dev/null
+++ b/templates/remotes--
@@ -0,0 +1 @@
+: this is just to ensure the directory exists.
Previous: Junio C Hamano
Message 7 of 7 in “Updated multi-head downloads and $GIT_DIR/remotes/ support”
  1. Junio C HamanoAug 20, 2005
  2. Start adding the $GIT_DIR/remotes/ support.Junio C Hamano, Aug 20, 2005
  3. Multi-head fetch.Junio C Hamano, Aug 20, 2005
  4. Retire git-parse-remote.Junio C Hamano, Aug 20, 2005
  5. Infamous 'octopus merge'Junio C Hamano, Aug 20, 2005
  6. Make "git pull" and "git fetch" default to originJunio C Hamano, Aug 20, 2005
  7. Use .git/remote/origin, not .git/branches/origin.Junio C Hamano, Aug 20, 2005

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.