diff SVN Command

How to use diff SVN (Subversion) Command in Linux / Windows?

Explanation


diff command is used to check the difference between the content in the files among the local repo and server repository.

Usage:

svn diff <filename>
filename - is not mandatory. If file is not given, svn will report the diff for all the files and folders starting from the current location.
Else it will check the difference of the given file.

Example:

  • Check the difference between content in the files to the server using the below command.
    svn diff test1.txt
    Output:--------------------------------------------------------------------------
    Difference between the local and server file Example Output:
    =================================================
    --- test1.txt (revision 3)
    +++ test1.txt (working copy)
    @@ -1,5 +1,5 @@
    -sd
    asd
    +asd
    asd
    asd

    ---------------------------------------------------------------------------------------

Result:


The above cmd shows the difference, that the line 'sd' is removed and 'asd' is added in the local working copy.

Ask Questions

Ask Question