Is it possible to save .gitignore files from SVN?

I use git svnto merge changes from the local git repository to the SVN server. However, when I issue git svn dcommit, it will actually commit any .gitignore files that I have in my source tree. This happens even after I checked the local SVN repository (using SVN), set the svn: ignore property (recursively listing .gitignore as one of the ignored files), and then passing this property directly to SVN.

Is this the intended behavior? Bug? Is there any work around that anyone knows to save .gitignore from SVN?

I just know that the non-git user in my team will see these files and start deleting them, and the next time I go to rebase/dcommit, a lot of junk files will start in SVN.

+5
source share
1 answer

You can use the git repo-specific file to "exclude" instead of using .gitignorefiles. The "exclude" file is located in $GIT_DIR/info/exclude(where $GIT_DIRis the directory of the Git repository, usually .git). The format of this file is exactly the same as in .gitignore files. The difference is that this is a file specific to the repository, it will exist only in your repository. It will not be distributed to any other repositories (for example, through git cloneor git svn dcommit).

.gitignore SVN, Git. , , git -svn SVN. , SVN; .

+8

All Articles