Howt to tell emacs VC that I want a file to be managed by git not by svn when the file is under both version systems?

I was using until now emacs21 with git.el, so it was not a problem but now with emacs22 git management is integrated in VC so I manage my git files with vc-git. That is ok when the files are only manged by git. I can see a GIT-master in the status. But when I am editing files managed by both svn (for the stable commits and group VC) and git (for my own and in-between commits) I don’t know how to force the commits to be done with git (the status say that is a svn file). Any idea?

I can always use the M-! git status M-! git add etc but having the VC shortcuts and integrating the diff in emacs is very nice.

note: I am not using git-svn at the moemnt. This is an already svn branch checkout that I want to have some experimental changes been controlled by git until the code becomes stable, instead of doing a svn sub-branch. I believe that the git-svn would be the way to go but unfortunately I need to find the time to read about it and install whatever is needed. So I am using what I already know that is simple git.

  • Git merging master to branch - conflicts (coming from Subversion background)
  • add global revision number in php source files
  • Code Repository best practices
  • How to remove a file with @ in it's name from svn in command line?
  • git svn: password for svn is not stored
  • When converting to git, how should I handle a single directory svn checkout?
  • The git equivalent of “svn status -u” (revisited)
  • Cloning non-standard layout SVN repo to git
  • 2 Solutions collect form web for “Howt to tell emacs VC that I want a file to be managed by git not by svn when the file is under both version systems?”

    You can customize vc-handled-backends and move Git above Subversion. You should really just try using git-svn though; you can use git rebase -i or git merge --squash to collapse (squash) a bunch of Git changesets into a single Subversion revision.

    I’m not sure if it could help you but I change VC backend between SVN and Git with C-x v b or M-x vc-switch-backend for a file tracked by both repos.

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