版本控制基础知识
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Android Studio 支持多个版本控制系统 (VCS),包括 Git、GitHub、CVS、Mercurial、Subversion 和 Google Cloud Source Repositories。
在将您的应用导入 Android Studio 后,您可以使用 Android Studio VCS 菜单选项启用对所需系统的 VCS 支持、创建仓库、导入新文件至版本控制,以及执行其他版本控制操作。
若要启用 VCS 支持,请按以下步骤操作:
- 在 Android Studio VCS 菜单中,选择 Enable Version Control Integration。
- 从该菜单中选择要与项目根目录关联的 VCS。
- 点击 OK。
此时,VCS 菜单将根据您选择的系统显示多个版本控制选项。
注意:您还可以使用 File > Settings > Version Control 菜单选项设置和修改版本控制设置。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Version control basics\n\nAndroid Studio supports a variety of version control systems (VCSs), including\nGit, GitHub, CVS, Mercurial, Subversion, and Google Cloud Source Repositories.\n\nAfter importing your app into Android Studio, use the Android Studio VCS menu\noptions to enable VCS support for the desired system, create a\nrepository, import the new files into version control, and perform other\nversion control operations.\n\nTo enable VCS support, follow these steps:\n\n1. From the Android Studio **VCS** menu, select **Enable Version Control\n Integration**.\n2. From the menu, select a VCS to associate with the project root.\n3. Click **OK**.\n\nThe VCS menu now displays a number of version control options based on the\nsystem you selected.\n\n**Note:** You can also use the **File \\\u003e\nSettings \\\u003e Version Control** menu option to set up and modify the version\ncontrol settings."]]