I have several files that are in the repo as well as in .gitignore.
I would like these files to be deleted from the repo but not deleted from my production server when I do git pull origin master
git pull origin master
I tried several solutions, but not a single seam worked, in each of them I delete files from the server when I do pull.
Literature:
How to make Git "forget" about a file that has been tracked but is now located in .gitignore?
Delete directory from remote repository after adding them to .gitignore
How to delete files specified in .gitignore, but still in the repository?
git filter-branch, , .
git filter-branch
: https://help.github.com/articles/remove-sensitive-data/
, , .
- , , :)
AFAIK, " , ".
- :
cp file file.prod git pull mv file.prod file
Source: https://habr.com/ru/post/1628128/More articles:Copy overhead when returning (large) items? - c ++Count the frequency of a repeating list - inside a list of lists - pythonLazy loading of table rows in jQuery datatables 1.10.10? - jqueryHow to programmatically change the contents of a toolbar? - androidShould C ++ abstract factory provide a destroy method for constructed objects? - c ++Convert country-specific date to UTC using NodaTime - c #Self-updating memory copy exercise, 6502 ASM - assemblyПространство имен jasmine не найдено в/node_modules/angular2/src/testing/matchers.d.ts - angularRedis py: when to use connection pool? - pythonHow to check if a record is available with Qt - c ++All Articles