Common svn command description
1. Retrieve the code from the SVN repository to the working copy:
# svn checkout https://svn.sinaapp.com/Appname [workcopy]
where workcopy is optional. If you don't write workcopy, SVN will default to appname as workcopy.
If you only retrieve a version:
# svn checkout https://svn.sinaapp.com/appname/appversion [workcopy]
Retrieve only a version A directory:
# svn checkout https://svn.sinaapp.com/appname/appversion/folder [workcopy]
2. Submit the code to the SVN repository:
# svn commit -m "here is message"
3. Add local files to the working copy:
# svn add something
Note: If something is a file Svn will add this file to the working copy; if something is a directory, svn will add the directory and the files inside it to the working copy. Something can also be a wildcard *, which ignores files that have already been added.
4, delete a file from the working copy:
# svn delete something
Note: If something is a file, svn will delete this file from the working copy; If something is a directory, svn will remove the directory and all the files from the working copy.
5, delete files directly from the SVN repository:
# svn delete -m "delete something" https://svn.sinaapp.com/appname/appversion/something
Note: Individual files or individual directories or even a version can be deleted directly from the SVN repository.
6. Import a local project into the SVN repository:
Import a version of the app:
# svn import localdir https://svn.sinaapp.com/Appname/appversion
Note: Make sure that the appversion of the current app does not conflict.
7. View the status of the file or directory in the working copy:
# svn status [something]
8. Update your working copy:
# svn update
Note: Downloading the latest version from the SVN repository will cause the local uncommitted changes to be lost. It is recommended to check the local copy status (svn status) before using this command.
9, cancel the code modification
Cancel the modification of the code is divided into two cases.
The first case: the change was not committed.
In this case, you can cancel the previous changes by using svn revert.
The usage of svn revert is as follows:
# svn revert [-R] something
Where something can be a relative path (of a directory or a file) or an absolute path.
When something is a single file, directly svn revert something on the line; when something is a directory, you need to add the parameter -R (Recursive, recursive), otherwise it will only change this directory.
In this case, you can also use the svn update command to cancel the previous changes, but it is not recommended. Because svn update will connect to the repository server, it takes time.
Note: svn revert itself is inherently dangerous because its purpose is to abandon uncommitted modifications. Once you choose to restore, Subversion has no way to retrieve uncommitted changes.
The second case: the change has been committed (commit). In this case, use the svn merge command to roll back.
The process of rolling back is as follows:
1) Make sure we get the latest code:
svn update
Suppose the latest version number is 28 .
2) Then find out the exact version number to be rolled back:
svn log [something]
Suppose the version number to be rolled back based on the svn log log is 25, here something can be a file, a directory or an entire project
If you want to know more about the situation, you can use svn diff -r 28:25 [something]
3) Scroll to version number 25:
svn merge -r 28:25 something
To be safe, reconfirm the result of the rollback:
svn diff [something]
Found correct and submitted.
4) Submit rollback:
svn commit -m "Revert revision from r28 to r25,because of ..."
29.
Summarize the above operations into three items as follows:
a. svn update, svn log, find the latest version (latest revision)
b. Find the one you want to roll back Version number (rollbak revision)
c. Use svn merge to roll back: svn merge -r : something
10, view SVN repository log information:
# svn log [ ,null,null,3],Workcopy]
View all local history logs. If workcopy is a file, then it is to view the log information of a file.
View log information for all files in the SVN repository:
# svn log https://svn.sinaapp.com/appname/
This command will view all modified Log.
Note: The SVN service provided by SAE fully supports all the commands of the standard SVN. For more detailed instructions, please refer to the official SVN help documentation.
Recently, many users cant find the “My Documents” icon on the feedback desktop. In fact, the main re
Blue screen is a common problem in our computer use, we can find the corresponding solution through
Some friends in the May 1 comment area asked Xiaobian to replace the hard disk and do not wa
Recently, many users are reporting that in the process of using the computer, the black screen autom
There are 3 ways to deal with the red account poisoning phenomenon in the system account
The simple setup of the system tutorial makes the Win7 system speed up
Reloading the operating system must see 20 contents
What should I do if the computer inserts a USB flash drive and then the blue screen?
How to delete the Windows.old folder under Win7
How to use RAR to make installer
QQ mailbox mail attachment can not be downloaded how to solve?
How to make the memory reach the optimal
What is the recovery folder? Can the recovery folder be deleted?
How to eliminate the phenomenon of pressing F1 when the computer is turned on
In-depth study of various system services in Windows XP
How to fix blue screen when installing WinXP in notebook
Built-in PDF plug-in browser 4.4.1.600 Beta release
How to set up Win8 to return the computer icon to the desktop
WP9 preview version or launched in December, support multi-window tasks
What should I do if the CentOS 6.5 network in VMware is not connected?
What is the file format of fdf? How to open the .fdf file?
Ubuntu 10.10 Alpha 2 beta release download
Solve the problem that can't open win8 split screen under low resolution
Win7 system only Sogou browser can open the web page, other browsers can not open how to do