Are there any reasons I can't just use git to track changes to my svn checkout?

后端 未结 2 1231
别跟我提以往
别跟我提以往 2021-01-25 18:23

I have gotten used to using git on some of my home projects and work projects to track the changes I make in my own folders. I would like to use it to track the changes I make

2条回答
  •  抹茶落季
    2021-01-25 18:59

    I do this too. I turn an svn checkout to an independent git repo at the same time. However, I don't include the .svn directories and I think you shouldn't.

    The practical advantages I'm using every day:

    • git ls-files | grep file-im-looking-for
    • git grep something-im-looking-for
    • Local experimental branches

    These are really serious benefits for me over a simple Subversion checkout.

    Why not use Git in the first place without Subversion? I have no control over the repository owner, so don't really have a choice. And git-svn is too fragile with large repositories.

    Finally, I add .gitignore to the Subversion repository, and mark the .git folder ignored. This is practical for my colleagues who also do this kind of thing. I'm also sort of counting on other developers to see such Git related stuff in the Subversion repository, I hope to make them wonder, and possibly fuel my agenda of migrating the repo to Git.

提交回复
热议问题