主要内容

添加项目源码控制

添加项目Git源码控制

如果要将版本控件添加到项目文件而不与其他用户共享,则在沙箱中创建本地Git™存储库即最快。

  1. 在“项目”选项卡上,在“源控制”部分中,单击Use Source Control

  2. In the Source control Information dialog box, clickAdd Project to Source Control

  3. 在“添加到源”控制对话框中,在源控制工具列表,选择Git使用项目提供的Git源控制工具。

  4. 点击兑换to finish adding the project to source control.

    Git在Sandbox Project根文件夹中创建本地存储库。该项目运行完整性检查。

  5. 点击开放项目返回您的项目。

    项目节点显示源控制名称Git和存储库位置Local Repository:yoursandboxpath.

  6. 选择Modified文件查看并单击Commit将文件的第一个版本提交到新存储库。

    在对话框中,如果您愿意,请输入注释,然后单击提交

小费

如果要使用Git和与其他用户共享:

  • 克隆现有的远程git存储库,请参阅克隆git存储库

  • 要将现有项目连接到远程存储库,请在“项目”选项卡上,在“源控制”部分中,单击Remote并为源分支指定单个远程存储库。

  • 使您的项目在GitHub上公开提供®,看看Share Project on GitHub

将项目添加到SVN源控制

警告

在开始之前,请检查您的Sandbox文件夹是否位于本地硬盘上。使用带有SVN的网络文件夹缓慢而不可靠。

This procedure adds a project to the built-in SVN integration that comes with the project. If you want to use a different version of SVN, see设置SVN源控制

  1. 在“项目”选项卡上,在“源控制”部分中,单击Use Source Control

  2. In the Source control Information dialog box, clickAdd Project to Source Control

  3. 在“添加到源”控制对话框中,选择SVN.作为源控制工具

  4. Next to存储库路径,点击Change

  5. In the Specify SVN Repository URL dialog box, select an existing repository or create a new one.

    • 要指定现有存储库,请单击“按钮来浏览存储库,粘贴URLinto the box, or use the list to select a recent repository.

    • 要创建新的存储库,请单击文件夹中创建SVN存储库。使用文件浏览器,创建要创建新存储库的文件夹,然后单击选择文件夹。Do not place the new repository inside the existing project folder.

      The project creates a repository in your folder, and you return to the Specify SVN Repository URL dialog box. The URL of the new repository is in the存储库框,项目自动选择树干夹。

    警告

    指定文件://URLs and create new repositories for single users only. For multiple users, see共享Subversion存储库

  6. 点击验证检查所选存储库的路径。

    当路径有效时,您可以浏览存储库文件夹。例如,选择树干文件夹,并验证对话框底部的所选URL,如图所示。

  7. 点击OKto return to the Add to Source Control dialog box.

    如果您的存储库具有文件URL,则会出现一个警告,即文件URL用于单个用户。点击OKto continue.

  8. 点击兑换to finish adding the project to source control.

    该项目运行完整性检查。

  9. 完整性检查运行后,单击开放项目返回您的项目。

    项目节点显示当前源控制工具和存储库位置的详细信息。

  10. If you created a new repository, select theModified文件查看并单击Commit将文件的第一个版本提交到新存储库。在对话框中,如果您愿意,请输入注释,然后单击提交

警告

在使用源控制之前,必须使用源控制工具注册模型文件以避免损坏模型。看到使用subversion注册模型文件

相关例子

更多关于