Git save file then stop tracking -


i want store datafile in project, stores default password. want stop tracking in git, , change dummy values real values. expect subsequently, when push, changed file remain same, , when pull too.

$ echo generic > mysecret.txt $ git add mysecret.txt $ git commit -m "added generic data secret file" $ echo "mysecret.txt" >> .gitignore $ echo secret > mysecret.txt 

hopefully, after password safe (although pretty sure not, asking advice here)

how should better handle problem?

you can use git update-index --assume-unchanged <path/to/file> after replaced dummy values real values.


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -