Pagine

Monday 17 October 2016

SVN tutorial n 4 - add and commit

The "commit" send changes from your working copy to the code repository. After the commit from an user X, the changes are available from other users using the svn update command. For commit all files with status changed (M, A, D, etc...) use:
 svn commit -m "<a comment>"
or
 svn ci -m "<a comment>"
If you want commit only a subset of files:
 svn commit -m "<a comment>" file1 file2 ....
Example: Status before commit:
 svn stat
M Employ.java
A myPackage/Person.java
Commit only Person.java
 svn commit -m "added Person.java" myPackage/Person.java
Status after commit
 svn stat
M Employ.java
If you want add a new file (or folder) under source control, use the add command:
 svn add <file>
After that use the commit command for send the changes to code repository.
 svn ci -m "a comment" <file>

No comments:

Post a Comment