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:
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)
You're on the right track, the svn:ignore is a template/list to define files that subversion should ignore. If you're doing this on Windows I suggest using free TortoiseSVN client that has a nice explorer-integrated GUI to make life much easier. It's just right click on a file -> TortoiseSVN -> add to ignore list.
Also, just found a post here that has the actual svn:ignore list for your projects: What files should I add to SVN ignore in an Project using Android Studio
Edited, as per comments, adding the list:
gradle
.idea
*.iml
build
.DS_Store ( => for mac only)
Adding a contrary opinion; I found that the ignore files was the wrong approach. Importing into SVN seemed to completely ignore the Ingore list and checked in everything..
I used Tortoise SVN which recommends not to use import, and to Import in Place
In Tortoise explorer popup:
Then in Android Studio:
These steps worked for me (using a Mac):
Setup ignore files in Android Studio / Preferences / Version Control / Ignored Files Directory: .gradle/ Directory: .idea/ Mask: *.iml Directory: build/ Mask: .DS_Store Directory: app/build/
Upper left hand corner, change dropdown from ‘Android’ to ‘Project’
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With