> On Oct 1, 2015, at 10:58 AM, [email protected] wrote:
> 
> When using Xcode 7.0.1 to diff between git branches, is there a way to take 
> each diff in turn and selectively apply it (or ignore it) from the right pane 
> to the left?

The old FileMerge tool still exists and works great. 

I prefer to do most of my SCM work from the command line. Here is a rather 
crude script that I haven’t changed since CVS days:

#!/bin/bash

# Delete any old files.
rm -Rf /tmp/gitdiff_*
mkdir -p /tmp/gitdiff_$$

# Do the diff.
git diff ${*} > /tmp/gitdiff_$$/patch

# Get a hold of the last parameter.
eval LAST=\${$#}

# Copy the file to /tmp, append the process ID, and .gitdiff to the file name.
mkdir -p /tmp/gitdiff_$$/$LAST
rm -Rf /tmp/gitdiff_$$/$LAST

cp "$LAST" "/tmp/gitdiff_$$/$LAST"

# Now patch the temp file to the previous version.
patch -s -R "/tmp/gitdiff_$$/$LAST" < /tmp/gitdiff_$$/patch

# Now run opendiff with the previous version and the current version.
opendiff "/tmp/gitdiff_$$/$LAST" "$LAST" -merge "$LAST”



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to