github删除文件

  github上传文件传错了,想删掉,找了半天都没找到怎么删。无奈去下git。安装好后,启动git CMD。默认目录很奇怪,可能是没有设置,在C:\Cadence_SPB\Cadence\SPB_Data。

  1在命令行输入git clone https://github.com/1171597779/big_file_inspector。这里这个地址是github目标仓库首页。会发现在本地目录下,出现了工程目录big_file_inspector。

  2.cd bigfile_inspector,进入子目录。

  3.dir,查看一下有什么情况。    

 1  驱动器 C 中的卷没有标签。
 2  卷的序列号是 DA41-FF5E
 3 
 4  C:\Cadence_SPB\Cadence\SPB_Data\big_file_inspector 的目录
 5 
 6 2018/07/07  02:54    <DIR>          .
 7 2018/07/07  02:54    <DIR>          ..
 8 2018/07/07  02:54               183 main.cpp
 9 2018/07/07  02:54               379 mainwindow.cpp
10 2018/07/07  02:54               366 mainwindow.h
11 2018/07/07  02:54               654 mainwindow.ui
12 2018/07/07  02:54            45,980 mysqlservices.lib
13 2018/07/07  02:54                95 README.md
14 2018/07/07  02:54    <DIR>          student
15 2018/07/07  02:54             1,536 student.pro
16 2018/07/07  02:54            24,043 student.pro.user
17                8 个文件         73,236 字节
18                3 个目录 70,192,021,504 可用字节

  4.git rm main.cpp,删除一个文件。

  5. git status,看一下要做的操作,现在还没有提交上去。

  6.git commit -m '提示信息',单引号里面的东西可以随便写,不重要。

  7.git push,完成绝杀。

猜你喜欢

转载自www.cnblogs.com/microthink/p/9276214.html
今日推荐