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

Re: Getting a branch's time of creation

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 19, 2010, 20:54 UTC
Message-ID
<m3pr30jan6.fsf@localhost.localdomain>
In-Reply-To
<27933166.post@talk.nabble.com>
jateeq <jawad_atiq@hotmail.com> writes:
Show 5 quoted lines
> I am trying to find the time at which a remote branch was created, so that I
> can use the '--since' option in git log to limit the commits to only ones
> that were created for that branch (read below to see why I can't use 'git
> log <branchnname>). So my question: does git remember the time at which a
> branch was created, and how can it be listed?
[...]
> If anyone has suggestions on doing this alternatively, feel free to pitch
> in. Thank you.

It looks like an XY problem to me: you are asking how to get about specific solution, instead of about how to solve a problem.

If you know what branch was remote branch created from, you can simply use

  $ git log <base>..<branch>
which translates into
  $ git log <branch> ^<base>

which means everything in <branch> that is not present in <base>. (Assuming that <branch> is the branch you are interested in, and <base> is the branch it was branched off).

<base> might be result of "git config --get branch.<branch>.merge" (if the upstream was correctly configured).

You can also get branching point with
  $ git merge-base --all <base> <branch>
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: jateeq
Message 4 of 4 in “Getting a branch's time of creation”
  1. jateeqMar 17, 2010
  2. Randal L. SchwartzMar 17, 2010
  3. jateeqMar 17, 2010
  4. Jakub NarebskiMar 19, 2010

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.