2012-09-27 53 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)存儲庫。