Home git Delete file from repository

Delete file from repository




downloaded a file with Application.yml codes to a remote repository (Github).
How can I remove it from there and stop tracking changes on it?

Answer 1, Authority 100%

  1. Add file to .gitignore
  2. git rm --cached --gnore-unmatch application.yml – delete the file only from the repository, and physically file will be saved on the disk
  3. Git Commit -am "Message"
  4. Git Push Origin {Branch Name}

Answer 2, Authority 12%

Delete and make Commit and Push. And, yes, yes, not delete, and in .Gitignore it

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions