Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure svn ignore settings with git svn?

I know I can configure folders and files for being ignored by subversion using the following commands:

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

Though, I use git svn to checkout a repository stored on a subversion server. I could not find a command to do the configuration this way. The following list shows all commands that are suggested by zsh completion for 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

Question:

  • Do you know if there is any way to edit the subversion ignore configuration via git svn?
like image 649
JJD Avatar asked Sep 27 '12 08:09

JJD


People also ask

How do I set property to ignore in SVN?

Use the following command to create a list not under version control files. Then edit the file to leave just the files you want actually to ignore. Then use this one to ignore the files listed in the file: svn propset svn:ignore -F ignoring.

Can I use Git and SVN at the same time?

No interaction between them. Just ignore the . git folder for SVN and the . svn folder for Git and you should be fine.


1 Answers

No, git-svn supports only creation of .gitignore by svn:ignore. To set svn:ignore you may

  1. Use svn propset svn:ignore 'value' URL where URL can be obtained by (git-svn git svn info path/to/directory | awk '/URL:/{print $2}') So you may write your own 'svn_propset.sh' script. To sync your .gitignore with svn:ignore run git svn create-ignore

  2. Use any of tools that allow .gitignore <-> svn:ignore translation. I know only two: SmartGit (client side, note: you need a fresh clone to turn ignores support on) and SubGit (server side, you need to have access to the server with SVN). In this case svn:ignore is set on pushing your local commit to the SVN(for SmartGit)/Git(for SubGit) repository.

like image 156
Dmitry Pavlenko Avatar answered Sep 19 '22 13:09

Dmitry Pavlenko