How to remove a file from git without removing it from your file system?
Answer / Amol Kumar
To remove a file from Git without deleting it from your file system, follow these steps:n1. Remove the file from your working directory.n2. Add the file to the .gitignore file to prevent it from being added back to Git.n3. Run `git rm --cached <file>` to remove the file from Git's index without affecting the file in your working directory.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the function of git clone?
How to create tag?
Explain the advantages of forking workflow?
Name some git commands and also explain their functions?
What is git fork? What is the difference between fork, branch, and clone?
What are the advantages of using GIT?
What language is used in GIT?
How will you know in git if a branch has already been merged into master?
How to resolve a conflict in git?
What is the function of ‘git diff ’ in git?
What is difference between fork and branch? How to create tag?
How to revert previous commit in git?