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