how to remove a file from git but keep local and ignore file 1

how to remove a file from git but keep local and ignore file

  git rm --cached {someFile}

Here is what the above code is Doing:
1. git rm –cached {someFile}
– This command removes the file from the staging area, but leaves the file on your local machine.
2. git add {someFile}
– This command adds the file back to the staging area.
3. git commit -m “Some message”
– This command commits the file to the repository.

Similar Posts