A
A
Astrohas2017-07-15 21:10:21
linux
Astrohas, 2017-07-15 21:10:21

How to ignore file update in GIT?

There is an example.txt file (for example). The file is necessary and there can be no question of any .gitignore . There is a remote repository for tests (test server) where you need to change a couple of lines of the file. How to make it so that when pushing, etc., the repository ignores any changes to this file - that is, so that after each commit or push I don’t have to merge manually. How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Astrohas, 2017-07-15
@Astrohas

git update-index --assume-unchanged FILENAME

E
Egor Kazantsev, 2017-07-15
@saintbyte

The .gitignore file at the root of the turnip
AND do git add -p and ignore changes to the file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question