在 SVN 存储库中导入 Android Studio 项目的正确方法是什么? [英] What is the right way to import an Android Studio project in a SVN repository?

查看:31
本文介绍了在 SVN 存储库中导入 Android Studio 项目的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 SVN 存储库中导入一个 Android Studio 项目.我显然尝试过

<块引用>

VCS->导入到版本控制->导入到Subversion...

但问题是,即使取消选中Include忽略的资源框,软件也会不断将项目文件夹中的所有文件上传到SVN.我还尝试执行 Share Project (Subversion) 并且它不上传任何内容(仅创建远程文件夹):当我尝试提交时,它想上传所有文件,例如导入选项.

我也尝试使用 svn:ignore 属性,但运气不佳.

我的问题是:

  1. 这样做的最佳方法是什么?
  2. Android Studio 不应该自动处理这些事情吗?如果没有,为什么?

感谢您的帮助.

解决方案

我按照这些步骤,我已经成功地将 android 项目导入到 subversion 存储库中.

(1) 启用VCS集成(在VCS下)

(2) 设置 -> 版本控制 -> 忽略的文件(在此处添加 .gitignore 文件中的文件、文件夹) - 它应该如下图所示.在此之后,您可以看到被忽略的文件以单独的颜色(如黄色)和其他需要以另一种颜色(红色)添加到 subversion 的文件

(3) VCS -> 导入到版本控制 -> 导入到 Subversion(我使用的是 subversion).选择父文件夹,而不是应用程序文件夹.

(4) 在对话框中取消选中包括忽略的资源",然后导入

(5) 最后将项目Checkout到同一个项目文件夹中.在此之后,添加到远程存储库的文件(红色)的颜色将消失.

注意:您可以在提供存储库位置后创建一个新的远程文件夹(VCS -> Browse VCS Repository -> Browse Subversion Repository)

I'm trying to import an Android Studio project in my SVN repository. I obiviously tried

VCS->Import into Version Control->Import into Subversion...

but the problem is that, even unchecking the Include ignored resources box, the software keeps uploading basically all the files in the project folder to SVN. I also tried to do Share Project (Subversion) and it doesn't upload anything (just creates the remote folder): when i try to commit, it wants to upload all files like the import option.

I also tried to play a bit with the svn:ignore property, but with not much luck.

My questions are:

  1. What's the best way to do this?
  2. Shouldn't Android Studio automatically take care of these things? If no, why?

Thanks for the help.

解决方案

I followed these steps and I have successfully imported the android project into subversion repository.

(1) Enable VCS integration (under the VCS)

(2) Settings -> Version Control -> Ignored Files (add the files, folders in your .gitignore file here) - It should be like below image. After this you can see the ignored files in separate color(like yellow) and other files that need to add to subversion in another color(red)

Type intellij here and it will give you the ignored file list

(3) VCS -> Import Into Version Control -> Import into Subversion (I'm using subversion).Select the parent folder, not app folder.

(4) In the dialog uncheck 'Include ignored resources' then import

(5) Finally Checkout the project into the same project folder. After this the color of the files(red) that were added to remote repository will be disappeared.

Note: You can create a new remote folder after giving the repository location(VCS -> Browse VCS Repository -> Browse Subversion Repository)

这篇关于在 SVN 存储库中导入 Android Studio 项目的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆