Is it possible to keep .gitignore files out of SVN?

I’m using git svn to merge changes from my local git repository to an SVN server. However, when I issue git svn dcommit it will actually commit any .gitignore files that I have in my source tree. This is even after I’ve checked out the SVN repository locally (using SVN), set the svn:ignore property (recursively, listing .gitignore as one of the files to ignore), and then committing that property change directly to SVN.

Is this intended behaviour? A bug? Is there a work around that anyone knows of to keep .gitignore out of SVN?

  • Can't clone any repository using git
  • Remove all git files from a directory?
  • Connect to TFS Git from Xamarin Studio (non-hosted, locally installed TFS 2013)
  • Disable git EOL Conversions
  • Git: definition of upward/downward directions between branches feels counterintuitive
  • How can I trust Git merge?
  • I just know a non-git user on my team is going to see these files and start deleting them, then the next time I go to rebase/dcommit a lot of unwanted files are going to wind up in SVN.

  • Git Log Stat Summary Results Clarification
  • GIT: How to see pulled/pushed changes in origin
  • Git - different commits each, respectively. (use “git pull” to merge the remote branch into yours)
  • GitPython and sending commands to the Git object
  • Can not switch git branch: “Untracked file” but working directory clean
  • Trying to get svn2git working on Windows
  • One Solution collect form web for “Is it possible to keep .gitignore files out of SVN?”

    You can use Git’s repo-specific “exclude” file, instead of using .gitignore files. The “exclude” file resides at $GIT_DIR/info/exclude (where $GIT_DIR is the Git repository directory, usually .git). The format of this file is exactly the same as that of .gitignore files. The difference is that this is a repository-specific file — it will only exist in your repository. It will not be propagated to any other repositories (e.g. via git clone or git svn dcommit).

    There is no way to omit .gitignore files from the SVN repo, but keep them in Git. Any attempt to do so would result in your local commits not matching the commits that git-svn retrieves from the SVN server. In other words, your local repository’s history would not be reconcilable with the history from SVN; they would be permanently out-of-sync.

    Git Baby is a git and github fan, let's start git clone.