当前位置:网站首页>SVN使用规范
SVN使用规范
2022-07-03 16:07:00 【星哥玩云】
1.提交必须写明注释
清晰的提交注释有助于别人理解你所做的修改,出现问题时能够快速定位,也有助于项目经理把握开发进度。所以,在提交代码时,要填写明晰的标注,能够概要的描述所提交文件的信息,让项目组其他成员在看到标注后不用详细看代码就能了解你所做的修改。
2.禁止提交未编译通过的代码
代码在提交之前,首先要确认自己能够在本地编译,保证主干永远是畅通的。如果引用了新的文件,要确保所用引用的文件一起提交。
- 代码通过单元测试
- 程序启动正常
3.不要提交自己不明白的代码
代码在提交入SVN之后,这样代码将被项目成员所分享。如果提交了自己不明白的代码,你看不懂,别人也看不懂,这将会成为项目质量的隐患。因此在引入任何第三方代码之前,确保你对这个代码有一个很清晰的了解。
3.不要提交自己的临时测试代码
提交到SVN的代码是比较正式的代码,和其他成员共享,自己的临时测试代码提交前要注释掉,做到不影响其他成员的开发。
4.不要提交本地自动生成文件
开发工具会自动生成一些工程等文件,以及项目编译生成的临时文件等等。提交了这样的文件后,别人在更新后就可能与本地的环境冲突从而影响大家的工作。
由于SVN是在公网上,所以上传这些文件会过于累赘,影响提交及其他成员更新源码的速度,也白白浪费SVN服务器的空间资源。
5.按功能模块整体提交,提交不要过于频繁
完成一个功能模块后,将该模块相关修改作为整体提交。不宜分离过于频繁提交,导致功能上不同步。
6.提交前,先更新再提交
在提交之前先做一次更新操作,这样可以有效防止本地修改的文件产生冲突。
另一个可能就是提交成功了,但会覆盖了前一次其他成员的提交数据。
7.提交后可以就近让方便的同事及时更新
让同事及时更新下来,把代码编译一次,确保程序跑起来。
如果有问题,及时修正缺失遗漏的文件,及修正错误,避免错误造成太大的影响。
8.慎用锁定功能
在项目中要慎用锁定的功能,在你锁定了一个文件之后别人就无法继续修改提交该文件,虽然可以减少冲突的发生率,但是可能会影响项目组中其他人员的工作。平时只有在编辑那些无法合并的文件时(非文本文件),才适当的采用锁定操作。
边栏推荐
- Is it safe to open an account with flush?
- 0214-27100 a day with little fluctuation
- Initial test of scikit learn Library
- Please be prepared to lose your job at any time within 3 years?
- [combinatorics] summary of combinatorial identities (eleven combinatorial identities | proof methods of combinatorial identities | summation methods)*
- Microservice - fuse hystrix
- From the 18th line to the first line, the new story of the network security industry
- Mixlab编辑团队招募队友啦~~
- Microservice - declarative interface call openfeign
- 用通达信炒股开户安全吗?
猜你喜欢
[proteus simulation] 8 × 8LED dot matrix screen imitates elevator digital scrolling display
How to use AAB to APK and APK to AAB of Google play apps on the shelves
First knowledge of database
Vs2017 is driven by IP debugging (dual machine debugging)
App移动端测试【5】文件的写入、读取
Distributed task scheduling XXL job
App mobile terminal test [3] ADB command
Secsha system 1- login function
How to thicken the brush in the graphical interface
Asemi rectifier bridge umb10f parameters, umb10f specifications, umb10f package
随机推荐
Mb10m-asemi rectifier bridge mb10m
Effect of ARP package on FTP dump under vxworks-6.6 system
利用MySQL中的乐观锁和悲观锁实现分布式锁
"Remake Apple product UI with Android" (2) -- silky Appstore card transition animation
Microservice - declarative interface call openfeign
SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]
[proteus simulation] 74hc595+74ls154 drive display 16x16 dot matrix
Unity function - unity offline document download and use
坚持输出需要不断学习
TCP拥塞控制详解 | 3. 设计空间
How idea starts run dashboard
Rk3399 platform development series explanation (WiFi) 5.54. What is WiFi wireless LAN
Low level version of drawing interface (explain each step in detail)
Go language self-study series | if else statement in golang
突破100万,剑指200万!
First knowledge of database
How can technology managers quickly improve leadership?
Reflection on some things
App移动端测试【5】文件的写入、读取
The mixlab editing team is recruiting teammates~~