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

Re: branch management

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 10, 2009, 14:43 UTC
Message-ID
<m3d49c40ai.fsf@localhost.localdomain>
In-Reply-To
<08614AC584A6ED42BD836DE9286376E12A211FA9D0@spswchi6mail1.peak6.net>
Harry Duin <hduin@optionshouse.com> writes:
Show 7 quoted lines
> Yes, I am aware that branching is different in git than what I have
> used so far with SVN. But apart from the implementation, I have some
> information that I want to gather about work done on a branch. Here
> are a few questions/scenarios that I want to make sure we can
> handle. Remember that our branches are mapped one to one to a Jira
> ticket.
>

First, the syntax to get all commits in a branch 'branch' which was created ffrom trunk, i.e. branch named 'master' would be

  master..branch

See git-rev-list(1), git-rev-parse(1) and git-log(1) for details of A..B syntax.

> 1. show all code changes performed on a branch (for code review)
$ git log -p master..branch
> 2. show list of files/directories touched by a branch (useful when
>    looking for past fixes, but are unsure where the fix was done)

If you can use pickaxe search (git log -S...), or git-blame, or just looking throught "git log ... -- <path>", you can use

$ git rev-list master..branch | 
  git diff-tree --stdin -r --name-only |
  sort -u
(excluding sha1 hashes).
> 
> So far I have not found the exact syntax to get this information,
> but am convinced that git can provide it!
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Harry DuinNext: Nicolas Pitre
Message 9 of 12 in “show-branch: fix segfault when showbranch.default exists”
  1. show-branch: fix segfault when showbranch.default existsJunio C Hamano, Jun 9, 2009
  2. Stephen BoydJun 9, 2009
  3. Pierre HabouzitJun 9, 2009
  4. Junio C HamanoJun 9, 2009
  5. Pierre HabouzitJun 9, 2009
  6. branch managementHarry Duin, Jun 9, 2009
  7. Alex RiesenJun 9, 2009
  8. Harry DuinJun 10, 2009
  9. Jakub NarebskiJun 10, 2009
  10. Nicolas PitreJun 10, 2009
  11. Linus TorvaldsJun 10, 2009
  12. Daniel BarkalowJun 10, 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.