I have some configuration files in my solution. For development purpose I've done some configuration changes in those files. But i don't want those files to be get committed / pushed in my develop branch in GitHub repository. Is there any way I can add file names which I want to skip at the time of commit and push?
Asked
Active
Viewed 66 times
1 Answers
0
You simply can mark it as to ignore local changes (not with .gitignore
since it is already tracked), using git update-index --assume-unchanged
git update-index --assume-unchanged -- my-config-file
(You also have git update-index --skip-worktree
: see the difference here)
A git pull
would reset that flag.
To remove said flag manually: git update-index --no-assume-unchanged -- my-config-file
.