开发者

Files doesn't get deleted on github, while they are deleted on development machine?

开发者 https://www.devze.com 2023-03-10 11:19 出处:网络
I have deleted a set of files from my loca开发者_StackOverflow社区l development machine, however they are not deleted on GitHub and are thus showing on my production machine again when I deploy.

I have deleted a set of files from my loca开发者_StackOverflow社区l development machine, however they are not deleted on GitHub and are thus showing on my production machine again when I deploy.

How can I force these files to be deleted in the next commit?


The easiest thing is to use git add -u

It'll remove files that has been manually deleted from your git files. Just commit and pushnormally after that.

Check out the git cheat sheets for others git commands.

And also check that thread: git rm multiple files that have already been deleted from disk


You can use git rm file or git rm -f file if you have already delete the file you have to commit after that

see : http://www.kernel.org/pub/software/scm/git/docs/git-rm.html for more detail on git rm

0

精彩评论

暂无评论...
验证码 换一张
取 消