Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

revert - undo local, uncommitted changes in the working copy and replace with them with the current copy from the repo

Ignoring Files

Typically in most coding projects, there are local files which will be created by an IDE or other tool which should always be ignored by SVN., you will want to configure the SVN client to ignore certain types of files that you might have in your working copy but do not want to be visible.

You can add global file patterns to ignore to the config at These can be configured on a directory basis in the repository but an easier method is adding them to your Subversion config file, typically found at ~/.subversion/configThere should be a line which says "global-ignores" which can be un-commented and then modified. 

These are some of the settings I use :for this.

No Format
global-ignores = target *.class *.jar *.diff x.x *.log .classpath .project .settings *.tar.gz .cproject gmon.out *.slcio .dependencies

These The patterns will apply to all subversion directories and files so make sure that the files you include here really would never be checked into version controlSVN nodes.

Commands

All commands described below assume that you are in a command shell like terminal using bash on Linux and or similar Unix OS; also assumed is that the current working local directory is a local working copy of a an SVN structure node that has been checkout out of the repository.

...

Note that some (most) arguments to these commands like path/to/file are completely bogus and should be replaced by valid files in your working copy or the remote repository (depending on the command).

 

 

Checkout a

...

Structure Node

 

No Format
svn co svn://repo/some/dir

...

 

Working Copy Info

This command will print out general repository information like your current revision # number and the repository root.

No Format
svn info

Check the status of your local working copy

This command will list all your detailed information about changes and additions in the to your local working copy :compared with the repository.

No Format
svn status

Each file listed with this command will have a letter next to it, such as:.

No Format
M = locally modified

...


? = not tracked by Subversion

...


A = added

...


D = deleted

...


[etc.]

Check the SVN docs documentation for a full list of all these abbreviations.

Show

...

Repository Contents

You can list the contents of a directory on the server using this command in your working copy.

No Format
cd my-working-copy; svn ls 

...

some/relative/path/

...

Or you may also use a URL in which case the command need not be executed within a working copy.

No Format
svn ls svn://repo/some/path/

...

Update Working Copy

svn up

Add files to the repository

...

svn propset svn:ignore "*.log" .

Warnings and Tips

...

Do not EVER checkout an SVN project into another Subversion structure node.  This has the potential to create some serious issues when executing Subversion commands, and it will also confuse you.

...

When executing more complex commands such as 'svn merge' use the '--dry-run' argument like 'svn --dry-run merge' to see what will happen without the command actually being executed.

...