I uploaded to the remote repository (github) a file with the codes application.yml. How can I remove it from there and stop tracking changes on it?
- ru.stackoverflow.com/q/426401/178576 - aleksandr barakin
|
2 answers
- Add file to
.gitignore git rm --cached --ignore-unmatch application.yml- delete the file only from the repository, and the file is physically stored on diskgit commit -am "Message"git push origin {branch name}
- Executed the second command. The file was deleted altogether, I need to delete from the repository, and leave it on the disk. - ks_on_v
- It should not delete the file from the disk, but I added the answer - zhenyab
|
Delete and commit and push. And yes, not to delete, but in .gitignore it
- 3First delete, and then in .gitignore. Otherwise it will not help. - Pavel Mayorov
|