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

[PATCH 0/3] remote HEAD improvements

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 11, 2009, 06:01 UTC
Message-ID
<1234332083-45147-1-git-send-email-jaysoffian@gmail.com>

There is currently no porcelain for dealing with remote HEADs (i.e. $GIT_DIR/remotes/<remote>/HEAD). This series:

1) Teaches git remote a new "sethead" verb:
  To set a remote HEAD explicitly:
  $ git remote sethead <name> <branch>
  To set a remote HEAD to match the upstream repo:
  $ git remote sethead <name> -a
  To delete a remote HEAD:
  $ git remote sethead <name> -d
2) Teaches git remote show to display the remote HEAD:
  $ git remote show origin
* remote origin
  URL: git://git.kernel.org/pub/scm/git/git.git
  HEAD: master
3) Documents the new sethead verb. I also correct the git remote man page
w/respect to the "-m <master>" option. The man page implied that the remote
HEAD was set automatically when adding a remote (a la git clone), but this is
not true. And, since I couldn't find anywhere else that the point of having a
remote HEAD is documented, I documented it here.
Jay Soffian (3):
  builtin-remote: move duplicated cleanup code its own function
  builtin-remote: teach show to display remote HEAD
  builtin-remote: add sethead verb
 Documentation/git-remote.txt |   20 +++++++-
 builtin-remote.c             |  108 ++++++++++++++++++++++++++++++++++++++---
 2 files changed, 118 insertions(+), 10 deletions(-)
Next: Jay Soffian
Message 1 of 17 in “remote HEAD improvements”
  1. 0/3 remote HEAD improvementsJay Soffian, Feb 11, 2009
  2. 1/3 builtin-remote: move duplicated cleanup code its own functionJay Soffian, Feb 11, 2009
  3. 2/3 builtin-remote: teach show to display remote HEADJay Soffian, Feb 11, 2009
  4. 3/3 builtin-remote: add sethead verbJay Soffian, Feb 11, 2009
  5. Jeff KingFeb 12, 2009
  6. Jay SoffianFeb 12, 2009
  7. Jeff KingFeb 12, 2009
  8. Daniel BarkalowFeb 12, 2009
  9. Junio C HamanoFeb 12, 2009
  10. Daniel BarkalowFeb 12, 2009
  11. Jay SoffianFeb 12, 2009
  12. Daniel BarkalowFeb 12, 2009
  13. Jeff KingFeb 12, 2009
  14. Jay SoffianFeb 12, 2009
  15. Jeff KingFeb 12, 2009
  16. Daniel BarkalowFeb 12, 2009
  17. Jeff KingFeb 12, 2009

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.