I did not use .gitignore to ignore files such as compiled binaries in my project, so these compiled binaries were transferred to the Git repository. And now I am adding .gitignore to my project. I want to rebuild the entire Git repository, ignoring the files listed in .gitignore, without losing history. How can i do this?
Delete these binaries from the current cache if they were added.
git rm --cached abinary
Then your .gitignoreautomatically ignores these binaries.
.gitignore
, , . git filter-branch bfg repo cleaner.
git filter-branch
, git push --force, , ( ) , .
git push --force
Source: https://habr.com/ru/post/1652679/More articles:socket.io without using the default namespace / room function - javascriptCan scanf () turn a nonzero input into zero - cСписок li первый элемент css float не работает - htmlHow can I set up / down scroll keys for quick menu in vscode? - visual-studio-codeAsynchronous Firebase function, what is in the background and what is not - iosLocal file Luigi LocalTarget - python-3.xпри щелчке по элементу - jqueryAngular 2 - change src video after clicking on div - html5ImportError: No module named "cryptography" - pythonLogistic regression as a multiclass classification using PySpark and problems - pysparkAll Articles