git 删除文档详情方法
程序员文章站
2022-07-02 19:02:53
命令行
项番
命令
No.1
git rm -rf 文件夹名
No.2
git add -A...
命令行
项番
命令
No.1
git rm -rf 文件夹名
No.2
git add -A
No.3
git commit -m “delete dir”
No.4
git push
示例:
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$ git rm -rf 安装包
rm 'MySQL-集群/安装包/galera-3-25.3.21-2.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-client-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-common-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-devel-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-libs-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-libs-compat-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-server-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-test-5.7-5.7.18-25.12.el7.x86_64.rpm'
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$ git add -A
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$ git commit -m '删除安装包'
[master 839aeb0] 删除安装包
9 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 MySQL-集群/安装包/galera-3-25.3.21-2.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-client-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-common-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-devel-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-libs-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-libs-compat-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-server-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-test-5.7-5.7.18-25.12.el7.x86_64.rpm
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$ git push
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 309 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To http://10.163.189.85:9090/handbook/basesystem.git
b60c315..839aeb0 master -> master
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$ git rm -rf 安装包
rm 'MySQL-集群/安装包/galera-3-25.3.21-2.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-client-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-common-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-devel-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-libs-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-libs-compat-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-server-5.7-5.7.18-25.12.el7.x86_64.rpm'
rm 'MySQL-集群/安装包/mysql-wsrep-test-5.7-5.7.18-25.12.el7.x86_64.rpm'
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$ git add -A
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$ git commit -m '删除安装包'
[master 839aeb0] 删除安装包
9 files changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 MySQL-集群/安装包/galera-3-25.3.21-2.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-client-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-common-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-devel-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-libs-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-libs-compat-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-server-5.7-5.7.18-25.12.el7.x86_64.rpm
delete mode 100644 MySQL-集群/安装包/mysql-wsrep-test-5.7-5.7.18-25.12.el7.x86_64.rpm
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$ git push
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 309 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
To http://10.163.189.85:9090/handbook/basesystem.git
b60c315..839aeb0 master -> master
dengzhiwendeMacBook-Pro:MySQL-集群 odeng$
下一篇: SQL优化30条