What is the SVN command to find the difference between two files on the hard disk (neither of which are in the repository)?
What is the command to find if one of the file is in a particular revision of SVN?
What are some of the cool things you do using SVN commands?
The svn diff command reveals the differences between your working copy and the copy in the master SVN repository.
If you want to compare two revisions in an item's history, for example revisions 100 and 200 of the same file, just use TortoiseSVN → Show Log to list the revision history for that file. Pick the two revisions you want to compare then use Context Menu → Compare Revisions.
That's where the command TortoiseSVN → Check For Modifications... comes in handy. This dialog will show you every file that has changed in any way in your working copy, as well as any unversioned files you may have. If you click on the Check Repository then you can also look for changes in the repository.
The Checkout command is used to copy the files from the SVN repository to the working copy. If we want to access files from the SVN server, then we have to check out it first. The checkout operation creates a working copy of the repository where we can edit, delete, or add contents.
You don't use SVN to diff files that aren't in the repository. If you are using linux then use the command:
diff file1 file2
If you are using Windows then try a tool like win merge for example
To find information about a file in the repository then use the command:
svn info file
If you want to find out more about SVN, have a look at the official tutorial.
svn diff --old foo.c --new bar.c
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