O
O
Ord EO2018-11-22 17:41:45
git
Ord EO, 2018-11-22 17:41:45

How to stop tracking a file in git?

There is a file that is tracked in git, you need to make sure that after a certain point it stops being tracked in git. Those. those changes that exist today should be visible to the git, and should be displayed in the project, and all subsequent changes should not be displayed in the git, but be present in the project. How to do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
ohyou, 2018-11-22
@ohyou

Push the desired version of the file to the repository once, and then add the path and name of this file to .gitignore

A
Andrey, 2018-11-22
@VladimirAndreev

git rm --cache example.txt

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question