Working with the trunk only
Check out a working copy of the trunk, make all your modifications, test and debug them until everything works fine, then upload the changes.
- Create a working copy of the trunk:
svn checkout svn://pi.physik.uni-bonn.de/MarlinTPC/trunk MarlinTPC
This creates a directory called MarlinTPC
. All following commands in this example are executed in this directory. If you are in a subdirectory, only this subdirectory is affected.
- Make all your changes. You can use for instance
svn status
to see which files have been modified, svn diff
to see what changes you made in the file, svn log
to read the log messages, or svn add
and svn delete
to add and delete files. But do not commit until everything is tested and debugged!
- If someone else committed something to the trunk you should update your working copy with
svn update
. All changes are merged with your working copy, your local changes are not affected. In case the changes cannot be merged automatically, the file will end up in a conflict state. You have to resolve this conflict manually before you can commit the changes (for example you changed “int default = 2”
to “int default = 3”
, but the version in the trunk now says “int default = 4”
).
- After your changes are working and you updated the latest changes and resolved all conflicts, you commit to the repository:
svn commit --username <username> -m "Log message of the changes I made"
You only need the --username
option for the first commit you are doing, and only if the svn
username is different from the one on your local system.
--
PeterWienemann - 25 Apr 2007