Knowledge Base
KamlatechToolBlogContact Us
  • Kamlatech Documentation
  • Magento
    • Installation
    • Email Configuration
  • Blogger
    • Adding Code Block
  • Linux
    • Managing Logs
    • Prevent Package Update
  • Node
    • Installation
    • Http-Server
  • Github
    • .gitignore
    • Branch to New Repo
  • HTML
    • Common Header & Footer in HTML
  • Linkedin Infographics
    • Flame Retardant Standards
    • Flame Retardant Terms
  • Music
    • Pandit Niladri Kumar - Sitar
  • Applications
    • Konvect Connect
    • Konvect Fetcher
    • Konvect Fetcher WebApp
  • HTTPS SSL Certificate
    • Lets's Encrypt
  • Oracle Cloud Instance
    • Firewall
    • CPU Stressing
    • CPU Stressing Docker
  • SFTP
    • WinSCP SFTP
  • NextCloud
    • Installation
    • Post Install Tweak
    • PHP Version
  • Wordpress
    • NGINX Configuration
    • Image upload / Crop issue
    • Required PHP Modules
    • PHP Configuration
  • Healthcare Wearables (Cardiac)
    • Wearable ECG
    • Arrhythmia
    • Ambulatory ECG Usecase
    • Understanding EKG Leads
  • Flutter
    • Direct URL Access
    • Change Android PackageName
  • Math
    • Online Equation Writing
  • Backend Web Service
    • Flask App Deployment
  • 3D Modeling
    • DWG in Solid Edge
  • MariaDB
    • MariaDB Commands
  • Excel
    • HTML as String in Excel
  • Tools
    • Online Tools
  • PostgreSQL
    • PostgreSQL Installation
  • MEDUSA
    • Medusa Installation
    • Backend Server/Worker Mode
    • Frontend Deployment
  • Jupyter Lab
    • Jupyter Web App
  • WooCommerce
    • Product Filename Renaming
  • Embedded
    • Flash Xiao Sense Bootloader
Powered by GitBook
On this page
Edit on GitHub
  1. Github

.gitignore

When adding a .gitignore to a repository, the files which are already tracked will still be tracked, even though it is excluded in the .gitignore.

This may happen when a .gitignore is added latter or an SDK / Build Tool (like Flutter) updates, adding more components and files.

To implement the newly added .gitignore follow below steps

1) Commit any unsaved changes

2) Open the github repository in command prompt / windows terminal and use below command to removes everything from the index and keeps it in working area (all files are now not tracked by git or untracked)

git rm -r --cached .

3) Now sends all files from the untracked area to the stage area using below command, thus implementing .gitignore afresh

git add .

4) Now commit the changes using below command

git commit -m ".gitignore is now working"

5) Finally push the commit to the remote repository (on github)

git push origin

The last step can also be done on github desktop, where after step (4) commits are ready to be pushed.

PreviousHttp-ServerNextBranch to New Repo

Last updated 1 year ago