max-hou

从仓库删除文件会经历以下几步:

 

 

1、使用删除命令删除文件

git rm 要删除的文件

1
2
# git rm hello.txt
rm \'hello.txt\'

2、更新到临时区

1
2
3
4
# git commit -m "删除 hello.txt"
[master 117adf3] 删除 hello.txt
 file changed, 1 deletion(-)
 delete mode 100644 hello.txt

3、push到远程仓库

1
2
3
4
5
6
7
8
9
# git push
Username for \'https://github.com\'# 此处输入github账号
Password for \'https://xxx@github.com\':  # 此处输入github账号密码
Counting objects: 3, done.
Compressing objects: 100% (1/1), done.
Writing objects: 100% (2/2), 242 bytes | 0 bytes/sdone.
Total 2 (delta 0), reused 0 (delta 0)
To https://github.com/xxx/gitDemo.git
   7c1b9ee..117adf3  master -> master

分类:

技术点:

相关文章:

  • 2021-11-20
  • 2018-02-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
猜你喜欢
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-11-20
  • 2021-06-11
相关资源
相似解决方案