git question: About gitignore
我想大声告诉你
我想大声告诉你 2017-05-02 09:33:23
0
3
618

I have a question about git:

I forgot to add .gitignore before committing, and committed some binary files in the format of .db or .pyc. And to make matters worse, I committed several versions without paying attention. Now how do I commit it? Are these binaries being removed in batches from all versions and will they be stopped from being tracked in the future? Thank you!

我想大声告诉你
我想大声告诉你

reply all(3)
迷茫

To rewrite past commits, you can use git filter-branch or this

小葫芦

Use git rm file to delete the tracking of the file, and it will be deleted locally.
Use git rm file --cached file to delete the tracking of the file, but it will be retained locally.

Remember to add modification .gitignore and then push it

曾经蜡笔没有小新

Please ensure safety before starting the command:

git rm --cached [文件名]
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template