Date: Thu, 28 Mar 2024 10:57:46 +0000 (UTC) Message-ID: <222825310.51.1711623466625@fa0ec5443aab> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_50_600550653.1711623466623" ------=_Part_50_600550653.1711623466623 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Sometimes users complain that .gitignore isn't working - in that they ha= ve added specific files to .gitignore but git still identifies these files = as having changed when they are about to commit.
Often the cause is actually due to the user having previously committed = said files. That is, the files are committed to the repo, and hence g= it is tracking them. Adding said files to .gitignore after the fact d= oesn't then have the expected behaviour (basically because the expected beh= aviour is wrong in this case ).
A user needs to delete (and commit the deletions) from the branch head b= efore .gitignore will actually ignore the files in question.
An easy way to do this is essentially to remove all local files and then= re-add them by executing the following commands from git bash:
git rm = . -r --cached git add .
Then commit with a comment like "removed files that should be ignored".<= /p>