Re: branch management

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Harry Duin <hduin@xxxxxxxxxxxxxxxx> writes:

> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]