add new chinese translations
This commit is contained in:
20
pages.zh/common/git-hash-object.md
Normal file
20
pages.zh/common/git-hash-object.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# git hash-object
|
||||
|
||||
> 计算内容的唯一哈希键,并可选择创建具有指定类型的对象。
|
||||
> 更多信息:<https://git-scm.com/docs/git-hash-object>。
|
||||
|
||||
- 计算对象 ID 而不存储它:
|
||||
|
||||
`git hash-object {{path/to/file}}`
|
||||
|
||||
- 计算对象 ID 并将其存储在 Git 数据库中:
|
||||
|
||||
`git hash-object -w {{path/to/file}}`
|
||||
|
||||
- 指定对象类型计算对象 ID:
|
||||
|
||||
`git hash-object -t {{blob|commit|tag|tree}} {{path/to/file}}`
|
||||
|
||||
- 从 `stdin` 计算对象 ID:
|
||||
|
||||
`cat {{path/to/file}} | git hash-object --stdin`
|
Reference in New Issue
Block a user