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?

  • hg clone git:… aborts: failing connection?
  • How to view Github user content?
  • Where is Visual Studio storing Publish Profiles?
  • How to push existing source code to a repository in github?
  • Git subtree - subtree up-to-date but can't push
  • Should I merge master into a branch, and then merge back into master?
  • 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.

  • How to get NO context when using svn diff
  • Svn or Git client (or plugin) to find missing or broken files
  • Why is git-svn trying to use an old branch point?
  • How to fix Pull requests after a push --force disaster?
  • Which code is shared between the original Git and libgit2?
  • Is it possible to use TFS's Source control for the team but Git locally?
  • 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.