// svn status
HuangChao-MacBookPro:stockemotion hchao$ svn status
M code/app/Http/Controllers/AccountController.php
M code/app/Http/Controllers/DownloadController.php
M code/app/Http/Controllers/PickController.php
M code/app/Http/Controllers/ShopController.php
M code/app/Http/Controllers/StockController.php
M code/app/Http/Controllers/UserController.php
M code/app/Http/Middleware/AffordMiddleware.php
M code/app/Http/routes.php
M code/resources/download/StockTest.apk
? code/resources/views/shop/buy.blade.php
M code/resources/views/shop/index.blade.php
M code/resources/views/stock/module.blade.php
M code/resources/views/user/resetPassword.blade.php
? code/storage/logs/alipay/2015-08-16.log
? code/storage/logs/alipay/2015-08-17.log
? code/storage/logs/alipay/2015-08-18.log
? code/storage/logs/alipay/2015-08-19.log
M code/storage/logs/laravel.log
? code/storage/logs/weixin/2015-08-11.log
? code/storage/logs/weixin/2015-08-12.log
? code/storage/logs/weixin/2015-08-13.log
? code/storage/logs/weixin/2015-08-14.log
? code/storage/logs/weixin/2015-08-15.log
? code/storage/logs/weixin/2015-08-16.log
? code/storage/logs/weixin/2015-08-17.log
? code/storage/logs/weixin/2015-08-18.log
? code/storage/logs/weixin/2015-08-19.log
HuangChao-MacBookPro:stockemotion hchao$
// svn commit
HuangChao-MacBookPro:stockemotion hchao$ svn commit -m "version@20150818" .
Sending code/app/Http/Controllers/AccountController.php
Sending code/app/Http/Controllers/DownloadController.php
Sending code/app/Http/Controllers/PickController.php
Sending code/app/Http/Controllers/ShopController.php
Sending code/app/Http/Controllers/StockController.php
Sending code/app/Http/Controllers/UserController.php
Sending code/app/Http/Middleware/AffordMiddleware.php
Sending code/app/Http/routes.php
Sending code/resources/download/StockTest.apk
Sending code/resources/views/shop/index.blade.php
Sending code/resources/views/stock/module.blade.php
Sending code/resources/views/user/resetPassword.blade.php
Sending code/storage/logs/laravel.log
Transmitting file data .............
Committed revision 20.
HuangChao-MacBookPro:stockemotion hchao$
// svn status
HuangChao-MacBookPro:stockemotion hchao$ svn status
? code/resources/views/shop/buy.blade.php
? code/storage/logs/alipay/2015-08-16.log
? code/storage/logs/alipay/2015-08-17.log
? code/storage/logs/alipay/2015-08-18.log
? code/storage/logs/alipay/2015-08-19.log
? code/storage/logs/weixin/2015-08-11.log
? code/storage/logs/weixin/2015-08-12.log
? code/storage/logs/weixin/2015-08-13.log
? code/storage/logs/weixin/2015-08-14.log
? code/storage/logs/weixin/2015-08-15.log
? code/storage/logs/weixin/2015-08-16.log
? code/storage/logs/weixin/2015-08-17.log
? code/storage/logs/weixin/2015-08-18.log
? code/storage/logs/weixin/2015-08-19.log
HuangChao-MacBookPro:stockemotion hchao$
// 没有加入的文件,怎么办? 一个一个添加????
// awk print
HuangChao-MacBookPro:stockemotion hchao$ svn status | awk '{if ($1 == "?") {print $2}}'
code/resources/views/shop/buy.blade.php
code/storage/logs/alipay/2015-08-16.log
code/storage/logs/alipay/2015-08-17.log
code/storage/logs/alipay/2015-08-18.log
code/storage/logs/alipay/2015-08-19.log
code/storage/logs/weixin/2015-08-11.log
code/storage/logs/weixin/2015-08-12.log
code/storage/logs/weixin/2015-08-13.log
code/storage/logs/weixin/2015-08-14.log
code/storage/logs/weixin/2015-08-15.log
code/storage/logs/weixin/2015-08-16.log
code/storage/logs/weixin/2015-08-17.log
code/storage/logs/weixin/2015-08-18.log
code/storage/logs/weixin/2015-08-19.log
HuangChao-MacBookPro:stockemotion hchao$
// xargs
HuangChao-MacBookPro:stockemotion hchao$ svn status | awk '{if ($1 == "?") {print $2}}' | xargs svn add
A code/resources/views/shop/buy.blade.php
A code/storage/logs/alipay/2015-08-16.log
A code/storage/logs/alipay/2015-08-17.log
A code/storage/logs/alipay/2015-08-18.log
A code/storage/logs/alipay/2015-08-19.log
A code/storage/logs/weixin/2015-08-11.log
A code/storage/logs/weixin/2015-08-12.log
A code/storage/logs/weixin/2015-08-13.log
A code/storage/logs/weixin/2015-08-14.log
A code/storage/logs/weixin/2015-08-15.log
A code/storage/logs/weixin/2015-08-16.log
A code/storage/logs/weixin/2015-08-17.log
A code/storage/logs/weixin/2015-08-18.log
A code/storage/logs/weixin/2015-08-19.log
HuangChao-MacBookPro:stockemotion hchao$
// svn commit
HuangChao-MacBookPro:stockemotion hchao$ svn commit -m "version@20150818" .
Adding code/resources/views/shop/buy.blade.php
Adding code/storage/logs/alipay/2015-08-16.log
Adding code/storage/logs/alipay/2015-08-17.log
Adding code/storage/logs/alipay/2015-08-18.log
Adding code/storage/logs/alipay/2015-08-19.log
Adding code/storage/logs/weixin/2015-08-11.log
Adding code/storage/logs/weixin/2015-08-12.log
Adding code/storage/logs/weixin/2015-08-13.log
Adding code/storage/logs/weixin/2015-08-14.log
Adding code/storage/logs/weixin/2015-08-15.log
Adding code/storage/logs/weixin/2015-08-16.log
Adding code/storage/logs/weixin/2015-08-17.log
Adding code/storage/logs/weixin/2015-08-18.log
Adding code/storage/logs/weixin/2015-08-19.log
Transmitting file data ..............
Committed revision 21.
HuangChao-MacBookPro:stockemotion hchao$
// 大招
$ svn status | awk '{if ($1 == "?") {print $2}}' | xargs svn add
转载于:https://blog.51cto.com/huangchao/1686200
本文详细介绍了使用SVN进行文件状态检查、选择性添加及提交更改的方法,包括如何通过命令行识别未跟踪文件、批量添加未跟踪文件至版本库以及提交更改的过程。
1112

被折叠的 条评论
为什么被折叠?



