Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to remove a file from git without removing it from your file system?



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

Post New Answer

More Git Interview Questions

What is the function of git clone?

1 Answers  


How to create tag?

1 Answers  


Explain the advantages of forking workflow?

1 Answers  


Name some git commands and also explain their functions?

1 Answers  


What is git fork? What is the difference between fork, branch, and clone?

1 Answers  


What are the advantages of using GIT?

1 Answers  


What language is used in GIT?

1 Answers  


How will you know in git if a branch has already been merged into master?

1 Answers  


How to resolve a conflict in git?

1 Answers  


What is the function of ‘git diff ’ in git?

1 Answers  


What is difference between fork and branch? How to create tag?

1 Answers  


How to revert previous commit in git?

1 Answers  


Categories