当前位置:网站首页>Svn learning
Svn learning
2022-07-19 10:53:00 【Winter dream chaser】
SVN Study
SVN Introduce
Subversion For short , It's an open source version control system , Branch management system was adopted .
Basic concepts
- repository( Source code library ): The place where the source code is stored , Beihui Redmine Each project in is a separate warehouse
- checkout( extract ): from repository Pull code from to local commit( Submit ): After the code changes , need commit To repository
- update( to update ): checkout After the source , If someone else changes the code in the process , need update The latest code
Workflow
Create a version Library redmine Automatically create a new project
Check out the mkdir –p /work/projectssvn co http://svn.polelink.com/repos/xxx
to update
Implement changes
Review changes
Fix errors
Resolve conflicts
Submit changes

Check out the project
svn co http://svn.polelink.com/repos/xxx
Project status
svn st ( You can add a specific path later )svn st –q: Only local changes , And exist in the warehouse , New files will not be displayed , Unchanged ones are not displayed

A: newly added , When a new file is created , perform svn add xxx After the show for A, Otherwise, it will be displayed as ?
C: Conflict , There is a conflict between the local modification and that in the warehouse
D: Delete , perform svn del xxx After the show for D
M: Local has changed
?: Not under version control , That is, there is no such file or directory in the warehouse
!: Loss , unexecuted svn del, Directly delete the file or directory in the file system
L: lock , When the operation is disconnected or forcibly suspended, etc , or svn lock After the command
I: Ignore
R: Replace
X: Directories not included in version control , Created by an externally referenced Directory
SVN Common commands
Code check out checkout
- This order will put SVN The code on the server is downloaded to our computer ,checkout Or we could just write it as co
svn checkout svn://svnbucket.com/xxx/xxx
# Specify the storage directory
svn checkout svn://svnbucket.com/xxx/xxx save-dir
# Specify user name and password .
svn checkout svn://svnbucket.com/xxx/xxx --username xxxx --password xxx
Submission code commit
- This command can submit our local modifications to SVN The server , So that other colleagues can update our code .
commit I could just write it as ci,-m The parameter is followed by the description of this submission
# Description is necessary , But you can fill in an empty string , Don't specify
svn commit -m " Submission description "
# Submit only specified files or directories
svn commit /path/to/file-or-dir -m " Submit the specified document "
# Specify all files with suffixes
svn commit *.js -m " Submit all js file "
Update code update
- Executing this command will change the code submitted by others from SVN The server is updated to our own computer ,update Or we could just write it as up
# Update to the latest
svn update
# Update to the specified version of the code . Especially when there is a problem with the latest version of the code , We can use this command to go back to the previous version
svn update -r xxx
# Only update the specified file or directory
svn up /path/to/file-or-dir
Add files add
- New file , We need to use add Order them to be added SVN Version management , Then we can submit it .
Be careful : You need to submit after adding .
# Add the specified file or directory
svn add /path/to/file-or-dir
# Add all... In the current directory php file
svn add *.php
Delete file delete
- This command will start from SVN Remove version control , After removal, you need to submit
svn delete /path/to/file-or-dir
# Delete version control , But files are still kept locally
svn delete /path/to/file-or-dir --keep-local
Check the log log
# View the log of the current directory
svn log
# View the submission log of the specified file or directory
svn log /path/to/file-or-dir
# Check the log , And output the list of changed files
svn log -v
# Limit the output to the latest 5 Logs
svn log -l 5
View changes diff
# View the changes in the current workspace
svn diff
# Check the changes of the specified file or directory
svn diff /path/to/file-or-dir
# The local file is different from the specified version number
svn diff /path/to/file-or-dir -r xxx
# Specify version number to compare differences
svn diff /path/to/file-or-dir -r 1:2
Undo modify revert
# Undo the local modification of the file
svn revert test.php
# Recursively undo local modifications in the directory
svn revert -R /path/to/dir
边栏推荐
- vulnhub inclusiveness: 1
- Satellite network capacity improvement method based on network coding
- Game theory (Depu) and investment (40/100)
- 人大、微软等提出InclusiveFL:异构设备上的包容性联邦学习
- 数据库面基知识汇总后
- 【CSP-J 2021】总结
- SVN学习
- Satellite network capacity improvement method based on network coding
- LeetCode 2319. 判断矩阵是否是一个 X 矩阵
- High number__ Relationship between equation and function
猜你喜欢

Beego框架实现文件上传+七牛云存储

ENVI_ Idl: use the inverse distance weight method to select the nearest n points for interpolation (bottom implementation) and output them to GeoTIFF format (the effect is equivalent to the inverse di

Design and Simulation of intelligent storage cabinet control system

英伟达用AI设计GPU:最新H100已经用上,比传统EDA减少25%芯片面积

LeetCode 2335. Minimum total time required to fill the cup

如何在双链笔记软件中建立仪表盘和知识库?以嵌入式小组件库 NotionPet 为例

Mobile keyboard (simulation question)

Establishment of redis cluster, one master, two slave and three Sentinels

Opencv programming: opencv3 X trains its own classifier

Design of the multi live architecture in different places of the king glory mall
随机推荐
【设计过程】.NET ORM FreeSql WhereDynamicFilter 动态表格查询功能
LeetCode 2335. 装满杯子需要的最短总时长
Redis集群、一主二从三哨兵的搭建
【CSP-J 2021】总结
Use testeract JS offline recognition picture text record
树链剖分思想讲解 + AcWing 2568. 树链剖分(dfs序 + 爬山法 + 线段树)
LeetCode 2325. 解密消息(map)
Future applications and technical challenges of backscatter communication
LeetCode 2335. Minimum total time required to fill the cup
6G smart endogenous: technical challenges, architecture and key features
数据库面基知识汇总后
Design and Simulation of intelligent storage cabinet control system
Pytorch. NN implementation of multi-layer perceptron
About hping streaming test tool
新增、修改操作时自定义复杂逻辑校验-2022新项目
Leetcode ugly number problem solution
Take a look at this ugly face | MathWorks account unavailable - technical issue
Common collection properties
SAP S4 Material Management 库存模块 MARD 数据库表读取技术细节介绍
[acwing] game 60 c-acwing 4496 eat fruit