I have some user config file that I created initially. Users can change it locally and I want it not be pushed to remote. Try gitignore and it will ignore my initial file. Also try git update-index --skip-worktree, it seems good locally but it does not affect on remote. How can I do that?
Asked
Active
Viewed 26 times
0
klutt
- 28,260
- 15
- 48
- 83
Henson Fang
- 1,129
- 6
- 27
-
2You can't. [This is a Frequently Asked Question and is covered in the Git FAQ.](https://git.wiki.kernel.org/index.php/Git_FAQ#How_do_I_tell_Git_to_ignore_tracked_files.3F) – torek Jan 13 '22 at 10:19