Reputation: 14039
I have used several version control systems over my career - ClearCase, PVCS, SCCS, Perforce, CVS, SourceSafe - but never used a distributed system before.
For the first time, I am using a distributed system - Git. It's been weeks - but I cannot make head nor tail of how to do stuff.
A colleague create a branch and worked on a small feature in the branch. I now want to review all the changes he made in that branch. How do I do this in TortoiseGit (I have hooked up TortoiseGit to Windiff).
Is there a way to see a windiff of all changes done on that branch? What are the steps?
Upvotes: 5
Views: 3669
Reputation: 3111
Suppose your colleague pushed his commits to remote, and you fetched it from the remote. You are on master branch, and also made some changes but not push it to remote, yet. Then, the Show log shows you something looks like this: (Right click on root of repository -> TortoiseGit -> Show log. Make sure the All Branches
checkbox is checked.)
As you can see, your colleague added 2 commits. Also you can see there is fork point(commit) which its hash(SHA-1) is b6f7e84 and has a remote-tracking branch origin/master on it. Then you can select the following two revisions by using Ctrl + Mouse Left Key.
Then, right click on one of those two commits and click Compare revisions (you can compare any two commits this way)
TortoiseGit shows you this dialog to list all changed files between those 2 commits:
Double click on the file you want to reivew, for eample: on 1.txt, the built-in TortoiseGitMerge will shows you:
If you don't want to use TortoiseGitMerge for showing diff, you can setup other diff tool which support the command line. See External Program Settings for more infomation. There are some examples for ExamDiff, KDiff3, WinMerge, Araxis, but Windiff. (If you figure it out, please tell me, perhaps I could put it on TortoiseGit manual.)
If you want to see the changes of each commit. Just double click the file in log dialog. See:
Upvotes: 9
Reputation: 595
I can't find a way to make this entirely in TortoiseGit. But maybe this helps:
First use git command line. Then, with the outputs printed there, you can use the commit ids in the search box (in TortoiseGit log dialog).
For example:
Switch to the branch you want to inspect and execute:
git log AGAIN_THE_SAME_BRANCH_NAME..
You'll get the list of changes made only in that branch.
Then paste the id in the search:
Click the line the TortoiseGit found and see the files that were changed in this commit.
You can also compare the two commits you want using "Diff with previous version" if you have a commit apart of other.
I hope someone finds a better way to do this straight on TortoiseGit. For now, this seems the shortest way I found to do this.
Upvotes: 0