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

Re: How can i find the origin of a branch?

From
KAKristian Amlie <kristian.amlie@nokia.com>
Date
Jun 15, 2009, 13:10 UTC
Message-ID
<4A36484A.3040207@nokia.com>
In-Reply-To
<81b0412b0906150548m69abc1bax785a4743119804c6@mail.gmail.com>
ext Alex Riesen wrote:
Show 13 quoted lines
> 2009/6/15 Kristian Amlie <kristian.amlie@nokia.com>:
>> ext Dotan Barak wrote:
>>> Is it possible to find the origin of a branch?
>>> (the remote repository that this branch was cloned and checked out from)
>> git config -l
>>
>> Assuming you're on the master branch, branch.master.remote and
>> branch.master.merge will tell you which remote and which branch you are
>> tracking. Assuming that the remote is origin, you can check
>> remote.origin.url to see the URL of the repo.
> 
> Except when it is just happen to have the same name.
> IOW, it is a BIG oversimplification.

Probably, but why make the simple case overcomplicated? It should give you the answer in 90% of the cases.

-- Kristian

Previous: Alex RiesenNext: Alex Riesen
Message 6 of 7 in “How can i find the origin of a branch?”
  1. Dotan BarakJun 15, 2009
  2. Kristian AmlieJun 15, 2009
  3. Dotan BarakJun 15, 2009
  4. Dotan BarakJun 15, 2009
  5. Alex RiesenJun 15, 2009
  6. Kristian AmlieJun 15, 2009
  7. Alex RiesenJun 15, 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.