git - How to ignore files locally without adding it in .gitignore -


i have github repository, checked out locally.

  • i changed environment variables in environment.local-dev.ts file. (it points localhost, don't have local api repository installed, updated file point colleagues local api)
  • now, changed configuration specific need. so, don't want commit these changes github repository

i searched 2 options :

  • to add file in .gitignore. problem is, still see .gitignore, might commit accidently.
  • to add in .git/info/exclude. did this, still seeing changed files when git status

the github repository, working on created else. cannot change initial configuration. other people working on same repository cannot commit changes might affter other people negatively.

so, problem find way not commit files being tracked git. there way ?

contrary said other answers, not assume-unchanged feature (that reserved big files costly check) should use skip-worktree.

see https://stackoverflow.com/a/13631525/717372


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -