Skip to content

Instantly share code, notes, and snippets.

@akottr
Last active December 16, 2015 19:50
Show Gist options
  • Save akottr/5488244 to your computer and use it in GitHub Desktop.
Save akottr/5488244 to your computer and use it in GitHub Desktop.

SVN basic commands

Info

Info about the repository

svn info

Changed files

prints only locally modified items

svn status

prints locally and remote modified items

svn status --show-updates
or
svn status -u

Diffs

prints only locally modified items

svn diff

prints locally and remote modified items

svn diff -r HEAD

Diff color

Shows the diff with colors.

'-R' means read only

'-' means the input is read from stdin (from the pipe '|')

svn diff -r r123456 pom.xml | vim -R -

History

see last 10 commit

svn log -v -l 10

Tree-Conflict (local deleted resource)

When does it happen? You deleted a file in a folder. The folder was deleted remotely

looks like that

D     C some/directory
      >   local unversioned, incoming add upon update
D       some/directory/some.file

How to resolve this:

touch some/directory/some.file
svn revert some/directory/some.file

Switch branch

svn switch http://path/to/your/branch/

Everything is merged automatically into the branch. If there are any conflicts it is shown on console.

Conflict discovered in '/home/developers/yourname/development/your-project/pom.xml'.
Select: (p) postpone, (df) diff-full, (e) edit,
        (mc) mine-conflict, (tc) theirs-conflict,
        (s) show all options: df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment