11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Basic Usage(h) help for more options: pC sandwich.txtUpdated to revision 2.$ ls sandwich.*sandwich.txt sandwich.txt.mine sandwich.txt.r2 sandwich.txt.r1$ svn resolve --accept theirs-full sandwich.txtResolved conflicted state of 'sandwich.txt'Punting: Using svn revertIf you decide that you want to throw out your changes and start your edits again (whetherthis occurs after a conflict or anytime), just revert your changes:$ svn revert sandwich.txtReverted 'sandwich.txt'$ ls sandwich.*sandwich.txtNote that when you revert a conflicted file, you don't have to use svn resolve.Commit Your ChangesFinally! Your edits are finished, you've merged all changes from the server, and you'reready to commit your changes to the repository.The svn commit command sends all of your changes to the repository. When you commita change, you need to supply a log message describing your change. Your log messagewill be attached to the new revision you create. If your log message is brief, you may wishto supply it on the command line using the --message (or -m) option:$ svn commit -m "Corrected number of cheese slices."Sending sandwich.txtTransmitting file data .Committed revision 3.However, if you've been composing your log message as you work, you may want to tell<strong>Subversion</strong> to get the message from a file by passing the filename <strong>with</strong> the --file (-F)option:$ svn commit -F logmsgSending sandwich.txtTransmitting file data .Committed revision 4.If you fail to specify either the --message or --file option, <strong>Subversion</strong> will automaticallylaunch your favorite editor (see the information on editor-cmd in the section called“Config”) for composing a log message.If you're in your editor writing a commit message and decide that you want tocancel your commit, you can just quit your editor <strong>with</strong>out saving changes. Ifyou've already saved your commit message, simply delete the text, saveagain, and then abort:$ svn commitWaiting for Emacs...Done32

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!