天天看點

Git 删除檔案

從倉庫删除檔案會經曆以下幾步:

Git 删除檔案
1、使用删除指令删除檔案

1

2

# git rm hello.txt

rm

'hello.txt'

3

4

# git commit -m "删除 hello.txt"

[master 117adf3] 删除 hello.txt

file

changed, 1 deletion(-)

delete mode 100644 hello.txt

5

6

7

8

9

# git push

Username 

for

'https://github.com'

# 此處輸入github賬号

Password 

for

'https://[email protected]'

:  

# 此處輸入github賬号密碼

Counting objects: 3, 

done

.

Compressing objects: 100% (1

/1

), 

done

.

Writing objects: 100% (2

/2

), 242 bytes | 0 bytes

/s

done

.

Total 2 (delta 0), reused 0 (delta 0)

To https:

//github

.com

/xxx/gitDemo

.git

7c1b9ee..117adf3  master -> master

git
上一篇: dos指令
下一篇: DOS指令