zoukankan      html  css  js  c++  java
  • Git 删除文件

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

    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
  • 相关阅读:
    L208
    L207
    L206
    L205 EE
    L204
    监控glusterfs
    监控elssticSearch健康状态
    防火墙
    创建逻辑卷
    编译安装nginx,并使用systemd管理nginx
  • 原文地址:https://www.cnblogs.com/max-hou/p/12040307.html
Copyright © 2011-2022 走看看