2012-09-27 74 views
14

我知道我可以配置文件夹和文件,使用下面的命令通过颠覆被忽略:如何使用git svn配置svn忽略设置?

svn propset svn:ignore build . // Ignores the build folder. 
svn propedit svn:ignore . // Opens an editor. 

虽然,我用git svn检出存储在Subversion服务器上的存储库。我找不到这样配置的命令。下面的列表显示了由zsh完成建议git svn所有命令:

$ git svn 
blame   -- show what revision and author last modified each line of a file: 
branch   -- create a branch in the SVN repository 
clone   -- same as init, followed by fetch 
commit-diff  -- commit diff of two tree-ishs 
create-ignore -- recursively finds the svn:ignore property and creates .gitignore files 
dcommit   -- commit diffs from given head onto SVN repository 
fetch   -- fetch revisions from the SVN remote 
find-rev  -- output git commit corresponding to the given SVN revision's hash 
info   -- show information about a file or directory 
init   -- initialize an empty git repository with additional svn data 
log    -- output SVN log-messages 
propget   -- get a given SVN property for a file 
proplist  -- list the SVN properties stored for a file or directory 
rebase   -- fetch revs from SVN parent of HEAD and rebase current work on it 
set-tree  -- commit given commit or tree to SVN repository 
show-externals -- show the subversion externals 
show-ignore  -- output corresponding toplevel .gitignore file of svn:ignore 
tag    -- create a tag in the SVN repository 

问:

  • 你知道,如果有任何的方式来编辑颠覆通过git svn忽略的配置?

回答

9

不,git-svn只支持通过svn:ignore创建.gitignore。要设置svn:忽略你可能

  1. 其中URL可以(git-svn git svn info path/to/directory | awk '/URL:/{print $2}')获得所以,你可以写自己的“svn_propset.sh”脚本中使用svn propset svn:ignore 'value' URL。要将.gitignore与svn同步:ignore run git svn create-ignore

  2. 使用允许.gitignore的任何工具< - > svn:ignore translation。我知道只有两个:SmartGit(客户端,注意:你需要一个新的克隆来忽略支持)和SubGit(服务器端,你需要有SVN访问服务器)。在这种情况下,将svn:ignore设置为将本地提交推送到SVN(对于SmartGit)/ Git(对于SubGit)存储库。