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

git push --repo option not working as described in git manual.

From
PPrem <prem.muthedath@gmail.com>
Date
Jan 26, 2015, 08:21 UTC
Message-ID
<loom.20150126T091917-791@post.gmane.org>
I am using git 2.2.2 and want to report an issue with git push --repo option.

git 2.2.2 manual says that git push --repo=public will push to public only if the current branch does not track a remote branch. See http://git-scm.com/docs/git-push

However, I see that git pushes even when the current branch is tracking a remote branch.

Here is the test case (push default setting is simple, git version
2.2.2, Mac OS X 10.10.1):
1. I have a local branch "master".
2. "master" tracks remote branch "blah/master".  Here "blah" is the
remote repository.
3. While I am on my local master branch, I run git push --repo=silver
4. git pushes the local master branch to silver repository.
5. But per git manual, it shouldn't push to silver, as the local
branch is tracking "blah/master". So is this broken or am I missing something?
Here is another test case (push default setting is simple, git version
2.2.2, Mac OS X 10.10.1):
1. I have a local branch "whoa".
2. "whoa" tracks remote branch "origin/whoa".  Here "origin" is the
remote repository.
3. While I am on my local whoa branch, I run git push --repo=blah
4. git pushes the local whoa branch to blah repository.
5. But per git manual, it shouldn't push to blah, as the local branch
is tracking "origin/whoa".  So is this broken or am I missing something?
Appreciate your help.
Next: Junio C Hamano
Message 1 of 9 in “git push --repo option not working as described in git manual.”
  1. PremJan 26, 2015
  2. Junio C HamanoJan 26, 2015
  3. git-push.txt: document the behavior of --repoMichael J Gruber, Jan 27, 2015
  4. Junio C HamanoJan 27, 2015
  5. Eric SunshineJan 27, 2015
  6. Prem MuthedathJan 28, 2015
  7. Junio C HamanoJan 28, 2015
  8. Eric SunshineJan 28, 2015
  9. Junio C HamanoJan 28, 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.