I have a github
repository, which I checked out locally.
- I changed my environment variables in
environment.local-dev.ts
file. (It usually points to localhost, but as I don't have local api repository installed, I updated file to point to my colleagues local api) - Now, the changed configuration is specific to my need. So, I don't want to commit these changes to the Github repository
I searched for two options :
- To add file in
.gitignore
. But the problem is, I will still see.gitignore
, which I might commit accidently. - To add it in
.git/info/exclude
. I did this, but I am still seeing the changed files when I dogit status
The Github repository, I am working on is already created by someone else. So cannot change the initial configuration. Also other people are working on the same repository so cannot commit changes which might affter other people negatively.
So, the problem is to find a way to not commit
files which are being tracked by git
. Is there a way to do this ?