Working offline with SVN on local machine temporary

前端 未结 6 1006
天命终不由人
天命终不由人 2020-12-22 21:23

I am working on a project currently on SVN. I however will not have access to the internet for a few days, and will be working on my project.

Is there any way to ma

6条回答
  •  忘掉有多难
    2020-12-22 21:59

    Your problem sounds to me like the use case for git-svn:

    • set up your Git repo: git svn clone http://svn.example.com/project/trunk
    • while being online, commit your changes to SVN
    • before going offline, do a git svn rebase to get your Git repo in sync with the SVN repo
    • while being offline, commit to the Git repo using git commit
    • when getting back online again, do a git svn dcommit to push your changes back to the SVN repo

    I'm using this workflow daily!

    You get two huge advantages doing so:

    • your complete SVN history is backed up in the Git repo and in every Git repo that gets cloned from that one
    • while being offline, you can view the commit messages, checkout other branches, etc.

提交回复
热议问题