I am using smartgit with github.
I have a config.json file on my remote github depot, with hidden passwords, at the root of the app .
I need to keep a different config.json file on my local depot, with real passwords.
As long as I try to ignore config.json locally, sometimes , it is still recorded as 'modified'

Some others times, when it finally gets ignored, by right clicking/ignore, It says  1'staged' , config.json finally gets deleted from Github when pushing the commit, I don't understand why:

THis is my .gitignore file :
.DS_Store
/config.json
config.json
node_modules
/uploads
/node_module
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
My config.json file , with blank that I need to leave as this on Github, because Heroku needs it :
{
    "localhost_db": "mongodb://localhost:27017/",
    "mongoDb_atlas_db": "mongodb+srv://jose:x@cluster0-6kmcn.azure.mongodb.net/vue-starter-webpack?retryWrites=true&w=majority",
    "dev": false,
    "db_name": "vue-starter-webpack",
    "ftp_config": {
        "host": "ftpupload.net",
        "user": "epiz_26763901",
        "password": "x",
        "secure": false
    },
    "node_file_path": "./tmp/files/",
    "cloudinary_token": {
        "cloud_name": "ddq5asuy2",
        "api_key": "354237299578646",
        "api_secret": "x"
    },
    "logs_path": "tmp/logs/logs.txt"
}
Is there any workaround ? I have tried plenty of things already. What does "staged" means ? How can I keep a different version of file on github and locally ?
EDIT : I am trying out this command, it seems to work ! :
git update-index --assume-unchanged config/database.yml
 
    
