Preventing local .gitignore from being pushed to svn repo with git-svn

I’m using git-svn to use git locally and deploy a client’s svn repo. However, after migrating the svn ignore entries to the .gitignore, I have to commit those to git.

But I don’t want that file being pushed as a commit to the svn repo everytime I do a git svn dcommit

  • How can I save an incompletely merged index in git?
  • Access log for git
  • DVCS working on remote server
  • Is there a way to make Git mark a file as conflicted?
  • How do I do a pristine checkout with git?
  • Renaming a remote (bare) repository with git
  • Any advice?

  • Reverting entire git repository to a specific version
  • git svn cherry pick ignored warning
  • Is there a specific protocol to add everything to Git using Rugged?
  • Clone a private repo of github with username and password
  • Fully backup a git repo?
  • Why isn’t eol=crlf honored in .gitattributes
  • 2 Solutions collect form web for “Preventing local .gitignore from being pushed to svn repo with git-svn”

    you can use git exclude instead. See the last section here:

    To exclude .gitignore from being pushed upstream you can include it in the .gitignore file.

    Simply, add the line “.gitignore” in your .gitignore file

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