Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save supercid/ecd04589338c0195a9b4f610f65ae67c to your computer and use it in GitHub Desktop.
Save supercid/ecd04589338c0195a9b4f610f65ae67c to your computer and use it in GitHub Desktop.
Git ignore changes to a particular file/path
# Recently i've been struggling to ignore my local changes to a .env file that was already committed in a git repo.
# To locally ignore your changes to that particular file/folder and keep tracking in the remote, use this:
git update-index --skip-worktree <path-name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment