svn command

svn
cd workspace_neweclipse/
cd ybh-parent-01/
ls
svn help
svn co
svn help checkout
svn co svn://svn.belink.top/ybh ./
svn stat
svn help
ls
svn ls

svn add --no-ignore
svn add . --no-ignore
svn add src --no-ignore
svn add ybh-service-01 --no-ignore
cd ybh-service-01/
ls
cd ../
svn add ybh-web-admin-01/
svn add ybh-web-weixin-01/
svn add .settings/
svn add pom.xml
svn add .classpath
svn add .project
sudo vi ~/.subversion/config
sudo gedit  ~/.subversion/config
exit
cd workspace_neweclipse/
cd ybh-parent-01/
svn stat
ls
svn propset svn:ignore "target"
svn help propset
svn ls
svn stat

svn propset svn:ignore "target" .
cd ybh-service-01/
ls
svn stat
svn propset svn:ignore logs  .
svn stat
svn propset svn:ignore target .
cd ../
svn commit -m "first commit"
svn diff
svn ls
cd ybh-service-01/
svn ls
cd target/
ls
svn ls
cd ../../
ls
svn propset svn:ignore "ybh-service-01/target" .
svn diff
svn commit
svn diff
ls
svn propset svn:ignore "ybh-web-admin-01/target" .
svn propset svn:ignore "ybh-web-weixin-01/target" .
svn diff
svn commit -m "add ignore"
svn diff
ls
cd ybh-web-
cd ybh-web-admin-01/
ls
ls -l
ls -a
svn ls
gedit ~/.bash_history
exit

如何把一个文件夹添加到忽略列表

一、如果还没做任何add 操作 ,则来到要添加到忽略列表文件夹的父文件夹,然后:

svn propset svn:ignore dirname .

svn commit

检查一下:

svn propget svn:ignore

二、如果已经把东西添加进去了,那么就要先用svn删除,注意是用svn删除,不是用操作系统删除!不是用操作系统删除!不是用操作系统删除!

 svn delete obj

再提交

svn commit

再添加

svn propset svn:ignore obj .

再提交

svn commit

Ignore file

To ignore all files with the ending .o use:

svn propset svn:ignore "*.o" .

Ignore dir

If you want to ignore folder tmp

svn propset svn:ignore tmp .

Ignore multiple files/dirs

If you want to ignore tmp,obj,bin dirs and all files with *.o
*.lib,*.la
extension. Save this file

tmp
obj
bin
*.o
*.lib
*.la

and name it svnignore.txt, the following command will do the job !

svn propset svn:ignore -F svnignore.txt .

Ignore multiple files/dirs via command line

svn propedit svn:ignore .

This will bring up list of files or directories to ignore.

Find files that are not under version control

To find such files:

svn status | grep ^\? | awk '{print $2}'

 

 

 

 

You're probably safest excluding particular filetypes, rather than picking those you want to include, as you could then add a new type and not realize it wasn't versioned.

On a per-directory basis, you can edit the svn:ignore property.

Run

svn propedit svn:ignore .

for each relevant directory to bring up an editor with a list of patterns to ignore.

Then put a pattern on each line corresponding to the filetype you'd like to ignore:

*.user
*.exe
*.dll

and what have you.

Alternatively, as has been suggested, you can add those patterns to the global-ignores property in your ~/.subversion/config file (or "%APPDATA%\Subversion\config" on Windows - see Configuration Area Layout in the red bean book for more information). In that case, separate the patterns with spaces. Here's mine. # at the beginning of the line introduces a comment. I've ignored Ankh .Load files and all *.resharper.user files:

### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output, and
### while importing or adding files and directories.
# global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store
global-ignores = Ankh.Load *.resharper.user

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值