19

我知道我可以使用以下命令将文件夹和文件配置为被颠覆忽略:

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

不过,我使用git svn检查存储在颠覆服务器上的存储库。我找不到以这种方式进行配置的命令。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
4

1 回答 1

13

不,git-svn 仅支持通过 svn:ignore 创建 .gitignore。要设置 svn:ignore 你可以

  1. 使用svn propset svn:ignore 'value' URLwhere URL 可以通过 ( git-svn git svn info path/to/directory | awk '/URL:/{print $2}') 获得所以你可以编写自己的 'svn_propset.sh' 脚本。同步你的 .gitignore 和 svn:ignore rungit svn create-ignore

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

于 2012-09-27T10:59:45.053 回答