Answer the question
In order to leave comments, you need to log in
How in git to stop tracking changes in such and such a file, NOT adding it to .gitignore (i.e. keeping the original version in the repository)?
The project has a config file that each developer customizes for himself.
Adding it to .gitignore will remove the file from the repository and the new developer won't download it.
As a result, his project build will not start at all.
You need to save the original file in the repository.
Then, at the start of the build, the developer will receive messages about which lines in which files he needs to customize for himself.
How can I make sure that these changes are not tracked by Git?
Answer the question
In order to leave comments, you need to log in
On the example of the .env file :
There is a file with environment variables that is used by the application and contains some data that should not be in the turnip. Then the guys do this:
1. Create a .env.dist file in the turnip , which, after cloning the turnip, is simply copied and renamed to .env
2. Write a sample config in it, but without critical data
3. Create a local .env
file
4. Add . env in .gitignore
Everything ))
Adding it to .gitignore will remove the file from the repository
You need to save the original file in the repository.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question