Using xcode I would like to see a diff between a working copy of a file and the latest commit in the respository. I know that if I commit I can get the comparison. And I know I do it from the command line using 'git diff'. But is there a way to do it from the xcode GUI?
I keep thinking there must be a way to do this, but can't find it.
To compare changes in one source file, open the file and click the Enable Code Review button in the upper-right corner of the Xcode window. The comparison view highlights changes between the current source code and the most recent commit.
Click and hold on the Version Editor button and select Log. You can also choose View\Version Editor\Show Log View from the menu. Xcode will list the commits that contain changes to the current file.
Here are screenshots.
Click the Version Editor button in the top-right (highlighted box):
Then, click the revision to compare with (footer highlighted box):
Also, you can navigate through each change using these buttons: <
and >
Finally, you can undo a single change with "Discard Change" like so:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With