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

Separate default remotes for pulling and pushing

From
DLDavid Lee <davidomundo@gmail.com>
Date
May 7, 2011, 08:10 UTC
Message-ID
<1FDDE878-C81A-4318-836B-7F8BED51A981@gmail.com>
Hello,
I couldn't find a way to do this, but it seems it would be a fairly common use-case:
I want to set up different default remotes for pushing and pulling so that I can pull from remote a using "git pull" and push to remote b using "git push". This is particularly useful when committing to projects on github, since you may only push to your fork, but you only want to pull updates from the original.
Right now, I can either set the original as my default remote, in which case I must use "git push myfork", or I can set my fork as the default remote, in which case I must use "git pull original".
Please let me know if I'm overlooking a feature already present in git that allows me to have separate remotes for pull and push. Otherwise, I hope it gets implemented in the next version of git!

Thanks for reading, David

Next: Sverre Rabbelier
Message 1 of 14 in “Separate default remotes for pulling and pushing”
  1. David LeeMay 7, 2011
  2. Sverre RabbelierMay 7, 2011
  3. Jeff KingMay 9, 2011
  4. David LeeMay 9, 2011
  5. Jeff KingMay 9, 2011
  6. David LeeMay 9, 2011
  7. Jeff KingMay 9, 2011
  8. Junio C HamanoMay 9, 2011
  9. Jeff KingMay 9, 2011
  10. Junio C HamanoMay 9, 2011
  11. Jeff KingMay 10, 2011
  12. Jay SoffianMay 10, 2011
  13. Jeff KingMay 10, 2011
  14. Jay SoffianMay 10, 2011

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.