0

We use GitHub as our code repository at work, with JIRA as our issue tracker, integrated with Crucible and FishEye for code reports and reviews. We label each of our commits with a feature branch number.

This setup has a very useful feature: by creating a Crucible review from the Reviews tab of the JIRA ticket we get a nice tree view of all files showing all the changes for a particular branch, even after that branch has been merged to master.

Here's an example:

enter image description here

We're now planning to move our issue tracking to GitHub Issues. I've looked quite carefully, but I can't see any counterpart to this in GitHub. GitHub compare gives me a good view of all file changes for a particular branch before I've merged it, but what about after? It looks like the only way to check the changes in a merged branch is to compare it against the commit in master immediately before the branch was merged.

Does GitHub have any way to view all commits for a merged branch, or all commits with a certain feature branch number in the description?

And Finally
  • 5,602
  • 14
  • 70
  • 110
  • 1
    If you use pull requests for all merges, you can still see the changes by viewing the pull request after it is merged. – cfstras Oct 03 '14 at 11:41
  • Thanks cfstras. I'm a bit confused about how you do that. When I try to create a new pull request, I'm prompted to choose comparison. When I try to compare master with the commit in which I made the latest merge, I get no difference, the usual problem when I try to compare a merged branch with master. – And Finally Oct 03 '14 at 13:08
  • In the "normal" GitHub workflow, you create pull requests selecting a feature branch after finishing a feature. A committer (could be yourself) then approves the request and it gets merged. The branch can be deleted, but the pull request will still be archived. I haven't yet found out how to see all changes made in a branch. You could find out the branch point and then diff it, but that could be cumbersome to do on the GitHub site. Maybe try and contact someone there? – cfstras Oct 03 '14 at 15:23
  • Note that this (creating a pull request) will not work after the branch has been merged, nor would it make any sense (to me). – cfstras Oct 03 '14 at 15:25

1 Answers1

0

The solution is the one cfstras pointed out in his comments: you create a pull request before you merge the branch. This creates a diff that remains available even after you merge. If you look at the "files changed" tab in the pull request you should see a combined view of all changes. Thanks a lot @cfstras!

enter image description here

And Finally
  • 5,602
  • 14
  • 70
  • 110