Eugene Loy
Eugene Loy

Reputation: 12416

gitk replacement allowing to view changes in files

We are starting to practice code review and there is a huge pain in making it in gitk, so i am searching for alternative or convenient workaround. What am missing in gitk is ability to:

  1. pick commit/range of commits
  2. see the files that was touched by those commit(s)
  3. pick one of the files and see its content with diffs (not only diff)

gitk, gitg and qgit seems to show only diffs per files, not the file with diff (you know, when the deleted lines are backgrounded with red and new ones with green). You can play with settings in Git Extensions to have this option but this is a Windows specific solution and i am searching something for Ubuntu.

One more thing - the tool should be gui, not console one.

Upvotes: 0

Views: 940

Answers (1)

patthoyts
patthoyts

Reputation: 33193

gitk can let you choose ranges of commits. On the command line you give the same arguments as for git log. For instance, gitk HEAD~10..HEAD~5 shows a set of 5 commits for me. If you then look at the edit view dialog you can see that the 'branches and tags' field can take various ways to specify your commits - including the command line as above.

With some commits shown as above, if you pick one commit you can then see the files that were touched by that commit in the patch view area. There was a bug in this area so you may need an up-to-date gitk for that. I don't think you can have it show all the files touched by all the selected commits though if that is what you wanted.

I'm unsure quite what you mean by point 3 - I suspect you may want the right-click menu on the filename and select 'External diff' which will launch your configured external diff program for that file and show you the diff of this file with itself in the parent commit. You configure the external diff on the gitk preferences dialog.

If you are keen on code review, you might also want to look into gitlab which can provide some github type web review features like raising merge requests and making comments on code through the web interface. Or gerrit for a much more formal system where nothing gets merged to the public repository unless it passes review.

Upvotes: 3

Related Questions