0

I'm making a project using git and github and I have a .env file that I want to show as existing but not actually change contents. So for example i have it set to default as

KEY=""
SECRET=""

This content is on my remote repo and I have added the file to the .gitignore after I made the initial commit so that hopefully it won't stage any keys I added but will keep the initial content. The file changes do show up in my unstaged changes when I made an edit however. This also happens with a databse file.

Maks K
  • 3
  • 2
  • https://stackoverflow.com/search?q=%5Bgit%5D+add+file+ignore+changes – phd Nov 15 '20 at 22:47
  • The Git FAQ [explains why this won't work in some detail](https://git-scm.com/docs/gitfaq#Documentation/gitfaq.txt-HowdoIignorechangestoatrackedfile). – bk2204 Nov 16 '20 at 03:12

0 Answers0