1

Question partially related with gitignore file.

Now when you create an Android project, Android Studio creates .gitignore with your project.

BUT it does not help, these files would be ignored if your code is already in git repository and ignored files ARE NOT already pushed.

.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build

Now i create a project, Android Studio creates tons of other files including , .idea .IML and so on and i have no idea how can i clean these irrelevant files and folder so i can push clean code to he repository.

Should i do this manually

abidkhan303
  • 1,761
  • 3
  • 18
  • 31
  • Please go through the answer http://stackoverflow.com/a/7532131/1349601 this should be helpful. – g90 Dec 15 '15 at 22:52

2 Answers2

0

if ignored files are already in your repository then you should cut them to a new folder outside repository (ex. desktop) then commit deleted files and then turn them back to repository ! this time they will not been tracked by git because they are in your .gitignore file

hamidrezabstn
  • 493
  • 7
  • 17
0

You can use git rm to untrack files without removing them if you have access to a terminal with git.

prasunnair
  • 92
  • 3
  • 12