Reputation: 79
I had pushed a new Django project BTRE to my git repository. But I can't ignore the static files from pushed to the repository even though I have mentioned the directories in .gitignore
file.
-BTRE_Project
|-btre
|-static
This is my .gitignore
file:
# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/
# in your Git repository. Update and uncomment the following line accordingly.
btre/static/
I have tried deleting the repository and pushing again after updating the .gitignore
file.
Upvotes: 2
Views: 2906
Reputation: 4710
If you want to ignore your static folder and all the files inside it, put this in your .gitignore
file.
static/
This will ignore the static directory and files inside that.
Upvotes: 3
Reputation: 110
You can add ignore by adding the folder path in .gitignore file also use git lfs if you want to commit static files.
Upvotes: 0