Only click specific files at a time

I have a git repository for the server. This server needs some files, but these files only need to be clicked once. Therefore, when someone edits it, it does not need to be entered into github, but when someone uploads the repository, it should receive an unedited file.

The server needs these files to run, but for each person these files are different, so I do not want it to be pressed again.

How can i do this?

+4
source share
3 answers

If you have not committed the files yet, I would say add the file name to your file .gitignore, for example:

<filename>.<extension>

So, if the package.json file:

package.json

Wildcards can be done using *

*.json

AoeAoe: , git add --force, .gitignore.

, - 10 , : readme.md , .

: : .gitignore , git update-index

:

git update-index --assume-unchanged path/to/file

:

git update-index --no-assume-unchanged path/to/file

+5

git, . .gitignore. , - , - .

gitignore

+1

[1]:

git rm --cached <file>

.gitignore - .

[1] git "" , , .gitignore

+1

Source: https://habr.com/ru/post/1654144/


All Articles