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

后端 未结 2 1230
别跟我提以往
别跟我提以往 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.

    0 讨论(0)
  • 2021-01-25 19:08

    I've tracked largeish, very active SVN repositories (Dungeon Crawl Stone Soup, if you absolutely need to know) for a long time, no trouble at all. Didn't do anything in the direction of pushing changes, though, just used git to pack up my (minor) patches to report on their bug tracker. Only problem was that the initial clone took more than a day, IIRC. But then they migrated to git a while back...

    0 讨论(0)
提交回复
热议问题