Import on TortoiseSVN?

后端 未结 5 1714
慢半拍i
慢半拍i 2021-01-12 12:27

I am trying to set up TortoiseSVN. I am using the Windows version and using the context menu, you right click and it has some options.

For initially getting my files

相关标签:
5条回答
  • 2021-01-12 12:40

    I use TortoiseSVN as my source control tool. I was also having some trouble learning how to use it at first, but it's quite simple:

    1. When you first get started, you need to create a repository: In Windows Explorer, browse to the place you want to create the repository (I store it on an external hard drive) and in the TortoiseSVN context menu click "Create repository here."
    2. To import your code into the repository, there are two methods:
      • Browse to where your code is currently located and select the command TortoiseSVN --> Import to import that directory into a repository of your choosing.
      • You can create a new repository (as explained above), do a checkout, insert your files into the checked-out directory, and do a commit (applies your changes back to the repository).
    3. In daily use, you're going to be using the checkout command to export changes from the repository (not the "export" command) and using the commit command to apply your changes. You may also be using the comparer tools built-in to TortoiseSVN to resolve conflicts between changes.
    4. Another common command is the export command, which exports the entire repository as it is at the current time.

    It seems a bit strange that it's giving you an error in that way. Could you please explain?

    0 讨论(0)
  • 2021-01-12 12:45

    The TortoiseSVN site has help on this topic:

    Importing Data Into A Repository

    The "Import in Place" method will be easiest.

    --By the way, "export" in Subversion is a way to get an unversioned copy of your code out of your repository.

    0 讨论(0)
  • 2021-01-12 12:57

    The reason I don't like using import is that you don't end up with a working copy after doing the import. When I have been working on some code and decide I want to add it to a new repository, I just check out the new (empty) repository over top of my existing code. Once you have done that, you have turned your code into a working copy and you can now add and commit (or ignore) any files you want. Much simpler than import, IMO.

    0 讨论(0)
  • 2021-01-12 13:01

    Actually, I'm not sure what "export" does, but if you use "import" instead, you will at least be able to get your files into the repository. Doing it this way will not make the folder you imported a svn-folder, so you will have to check it out manually afterwards. I guess it's just the same as Ben S's answer, just in other steps.

    0 讨论(0)
  • 2021-01-12 13:07

    Export is not what you think it is. It's used to get the files that are already in the repository without the extra versioning data.

    For my initial import, I usually just

    1. Create a new repository.
    2. Checkout the empty repository.
    3. Copy my files in empty, checkout directory.
    4. Commit.

    I've never had an issue doing it this way.

    This is essentially the same as the Import in place section of the TortoiseSVN manual. Except that I copy the files in after checkout to avoid the warning.

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