I need to ignore some files when pushing to github account. I read about git ignore. How to add files into gitignore? Can anyone help on this?
Asked
Active
Viewed 351 times
0
-
1Just create a file in the root of your project all call it ".gitignore". Don't forget the dot in front of it. And then just add the name of the folders you want it to ignore. Take a look [here](https://github.com/github/gitignore ) and [here](https://stackoverflow.com/questions/25436312/gitignore-not-working/25436481#25436481). – Ahmad Mar 17 '18 at 15:58
-
I tried it and added a file name to .gitignore, but still pushing is not successful :( – usergs Mar 17 '18 at 16:09
-
Take a look again at the second link I posted (https://stackoverflow.com/questions/25436312/gitignore-not-working/25436481#25436481) and follow those steps. – Ahmad Mar 17 '18 at 16:10
1 Answers
0
Use the following command: git rm --cached FILENAME
refer [1].

Vithursa Mahendrarajah
- 1,194
- 2
- 15
- 28