手把手教学-github同步删除文件及文件夹

先说同步删除文件

删除前:

第一步:

右键点击本地对应文件夹,单击 git Bash Here

第二步:

在弹出的命令窗口中,输入 git rm --f test.md 回车

第三步:

输入 git commit test.md -m '描述内容随便写' 回车

第四步:

输入 git pull 回车

扫描二维码关注公众号,回复: 5052208 查看本文章

第五步:

输入 git push 回车

第六步:

输入 git status -sb 回车

如果本地仓库与远程仓库一致,则如下图

查看结果:

再说同步删除文件夹

删除前:

第一步:

右键点击本地对应文件夹,单击 Git Bash Here

在弹出的命令窗口中,输入 rm -rf img project test text 回车

第二步:

输入 git rm -r img project test text 回车

第三步:

输入 git commit -m '删除了文件夹 img project test text' 回车

第四步:

输入 git pull 回车

第五步:

输入 git push 回车

第六步:

输入 git status -sb 回车

如果本地仓库与远程仓库一致,则如下图

查看结果 :

猜你喜欢

转载自blog.csdn.net/weixin_41990123/article/details/86500378