Removing files from githubs repository but not locally

Viewed 3752

So this is my repository: https://github.com/quinnliu/WalnutiQ

I added .gradle & build/ to my .gitignore file. However when I push this change I would like to remove the .gradle file and build/ folder from ONLY my repository and not locally. How can I do this?

2 Answers

After add .gradle on .gitignore, I just use

git rm -r .gradle

to clean my repository.

I can sync gradle again on Android Studio, it will create new .gradle on local without getting push on git.

Related