Adding version control to an existing project

前端 未结 22 957
天涯浪人
天涯浪人 2020-12-30 02:52

I am working on a project that has grown to a decent size, and I am the only developer. We currently don\'t use any version control, but I definitely need to start.

相关标签:
22条回答
  • 2020-12-30 03:27

    +1 on the answers provided by Joe and Steve.. I would also mention that it is important to set up your ignore lists or SVN Props so that you don't check in user files, resharper setting.

    Also make sure you include everything that may be needed for the build, such as build scripts, 3rd party assemblies, external tools such as nunit, nant etc

    While you are at it, I would highly recommend you look at CC.net, and getting continuous integration server installed to automate your build.

    Having source control is one thing, using it properly is another entirely. Remember to check in frequently and early.

    0 讨论(0)
  • 2020-12-30 03:31

    I use mercurial on my desktop and I love it. Creating the repository is super easy...

    hg init /path/to/repository
    

    Add the files...

    hg add /folder/pattern  
    
    OR
    
    hg add FILE
    

    Then you just commit...

    hg commit
    

    And you're up and running.

    The other great thing is when I want to sync to my laptop it's just...

    hg pull //desktop_name/path/to/repo/  
    hg update
    

    The thing that I like about subversion is the pluggin for Visual Studio, I stay on top of my updates more when the status icons are starring me in the face all of the time. The pluggin may definitely make up for the hassel of setting the svn repository up if you're going to be working with the one project a lot.

    0 讨论(0)
  • 2020-12-30 03:34

    Subversion Server install... Subverison Client Libraries instal...

    Install Ankh for integration with VS Install Tortoise for File Manager integration

    In File Manager, right click on top level direction with Solution... Import...

    0 讨论(0)
  • 2020-12-30 03:34

    I wondering why you had chosen Subversion? If your project is not using any vc, may be you should consider to use Mercurial or Git either.

    Their stronger point is that they don't need a central repository, that means that your programmers can checkout your project, go to their home, work (without having to have a connection to your servers), and the next day come back to the office and sync their repositories.

    If SVN is not a mayor requirement, i recommend to consider any of both dvc systems.

    0 讨论(0)
  • 2020-12-30 03:34

    The question was focused clearly towards an existing project. I have not yet found an appropriate answer in this thread and played around until I had the solution. The hassle comes when you checkout, as described in many answers, and you end up with a second versioned folder, your existing project remains unversioned and you are reluctant to copy/paste and/or rename your folders.

    The solution to this problem is as follows:

    Suppose you have a bunch of projects in PC1, all collected as subfolders under a folder named "Projects" and you want to version all of them in one repository. Then you would like to check it out on PC2 with the same folder structure. Then you do the following:

    1. Create a folder for your repository on the network drive and make sure that it is named "Projects", i.e. the same name as the parent folder of your development projects. For example create a folder like X:\Repository\Projects on a network drive.
    2. Right Click on this folder and choose TurtoiseSVN -> Create Repository Here
    3. Right Click on your development "Projects" folder on PC1 (your existing project) and press TurtoiseSVN -> Import. Choose the correct repository with the name "Projects" (in case you already have other repositories on the network drive). Now your projects are at the disposal for other PC's.
    4. Make a parent folder on PC2 where you want to have the "Projects" folder.
    5. Right Click on this Parent Folder on PC2 and choose SVN Checkout. The projects are now available on PC2.
    6. From now on, you use "commit" to store changes in the repository and "update" to get the latest version from the repository.
    0 讨论(0)
  • 2020-12-30 03:35

    No SVN server required.
    Use Tortoise Mercurial http://sourceforge.net/project/showfiles.php?group_id=199155

    Setup local repo
    1) Download and Install
    2) Open an explorer window to the base directory of you project
    3) Right-Click -> TortoiseHG -> Create Repository Here -> Ok
    4) Right-Click -> HG Commit...
    5) Type your commit comment, select which files to track, and click Commit

    Setup remote repo over file share (other transport methods available)
    1) Open explorer window to remote folder
    2a) Right-Click -> TortoiseHG -> Clone a Repository
    2b) Alternatively, just copy your local repo over

    Updating remote repo after committing local
    1) Open explorer window to remote folder
    2) Right-Click -> TortoiseHG -> Synchronize
    3) Select "Update to new tip" in Pull menu
    4) Enter the path to your local repo into the "Remote Path:" input box 5) Click Pull

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