Skip to content

Instantly share code, notes, and snippets.

@franklinsales
Created August 18, 2020 14:22
Show Gist options
  • Save franklinsales/f15f8b08ffa5a161b62c7ab045f775db to your computer and use it in GitHub Desktop.
Save franklinsales/f15f8b08ffa5a161b62c7ab045f775db to your computer and use it in GitHub Desktop.

Do the following to trigger the gitignore:

Commit all your pending changes in the repository which you want to fix and push that.

Remove everything from the git index in order to refresh your git repository. This is safe. Use this command:

$ git rm -r --cached .

Add everything back into the repo, which can be done using this command:

$ git add .

Commit these changes, using this command:

$ git commit -m "Gitignore issue fixed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment