{"id":13817887,"url":"https://github.com/chinanf-boy/hub-zh","last_synced_at":"2025-04-02T18:16:02.217Z","repository":{"id":90548413,"uuid":"150047061","full_name":"chinanf-boy/hub-zh","owner":"chinanf-boy","description":"🇨🇳翻译: \u003chub\u003e 让git与github更容易合作 ❤️ 校对 ✅","archived":false,"fork":false,"pushed_at":"2019-03-29T04:45:21.000Z","size":583,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T08:47:11.793Z","etag":null,"topics":["docs","git","hub","zh"],"latest_commit_sha":null,"homepage":"http://llever.com/hub-zh","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chinanf-boy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-09-24T02:54:44.000Z","updated_at":"2019-03-29T04:45:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"b443e199-f37f-48ac-b9d5-ab09f5b06876","html_url":"https://github.com/chinanf-boy/hub-zh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinanf-boy%2Fhub-zh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinanf-boy%2Fhub-zh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinanf-boy%2Fhub-zh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chinanf-boy%2Fhub-zh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chinanf-boy","download_url":"https://codeload.github.com/chinanf-boy/hub-zh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246866100,"owners_count":20846496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docs","git","hub","zh"],"created_at":"2024-08-04T06:00:58.481Z","updated_at":"2025-04-02T18:16:02.191Z","avatar_url":"https://github.com/chinanf-boy.png","language":"HTML","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# hub [![explain]][source] [![translate-svg]][translate-list] \n    \n\u003c!-- [![size-img]][size] --\u003e\n\n[explain]: http://llever.com/explain.svg\n[source]: https://github.com/chinanf-boy/Source-Explain\n[translate-svg]: http://llever.com/translate.svg\n[translate-list]: https://github.com/chinanf-boy/chinese-translate-list\n[size-img]: https://packagephobia.now.sh/badge?p=Name\n[size]: https://packagephobia.now.sh/result?p=Name\n    \n\n「 git + hub = github, 让git与github更容易合作 」\n\n[中文](./readme.md) | [english](https://github.com/github/hub)\n\n\n---\n\n## 校对 ✅\n\n\u003c!-- doc-templite START generated --\u003e\n\u003c!-- repo = 'github/hub' --\u003e\n\u003c!-- commit = 'de684cb613c47572cc9ec90d4fd73eef80aef09c' --\u003e\n\u003c!-- time = '2018 9.6' --\u003e\n翻译的原文 | 与日期 | 最新更新 | 更多\n---|---|---|---\n[commit] | ⏰ 2018 9.6 | ![last] | [中文翻译][translate-list]\n\n[last]: https://img.shields.io/github/last-commit/github/hub.svg\n[commit]: https://github.com/github/hub/tree/de684cb613c47572cc9ec90d4fd73eef80aef09c\n\n\u003c!-- doc-templite END generated --\u003e\n\n- [x] readme.md\n- [x] etc\n- [x] src\n    - [x] [./src/hub.1.zh.md](./src/hub.1.zh.md)\n\n### 贡献\n\n欢迎 👏 勘误/校对/更新贡献 😊 [具体贡献请看](https://github.com/chinanf-boy/chinese-translate-list#贡献)\n\n## 生活\n\n[If help, **buy** me coffee —— 营养跟不上了，给我来瓶营养快线吧! 💰](https://github.com/chinanf-boy/live-need-money)\n\n---\n\n### 目录\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [git + hub = github](#git--hub--github)\n  - [安装](#%E5%AE%89%E8%A3%85)\n      - [Homebrew](#homebrew)\n      - [Windows](#windows)\n      - [Fedora Linux](#fedora-linux)\n      - [Arch Linux](#arch-linux)\n      - [集成版本](#%E9%9B%86%E6%88%90%E7%89%88%E6%9C%AC)\n      - [源-安装](#%E6%BA%90-%E5%AE%89%E8%A3%85)\n  - [别名](#%E5%88%AB%E5%90%8D)\n      - [PowerShell](#powershell)\n    - [Shell tab-补全](#shell-tab-%E8%A1%A5%E5%85%A8)\n  - [元信息](#%E5%85%83%E4%BF%A1%E6%81%AF)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\n# git + hub = github\n\nhub是一个包装`git`的命令行工具,为了使用额外的功能和命令扩展,使得使用GitHub变得更容易.\n\n```sh\n$ hub clone rtomayko/tilt\n\n# 相等于:\n$ git clone git://github.com/rtomayko/tilt.git\n```\n\nhub是最好换成`git`别名,所以你可以在shell中输入`$ git \u003ccommand\u003e`和得到所有有用的`hub`功能.请参阅下面的\"别名\".\n\n看到[使用文档](./src/hub.1.zh.md)获取所有命令及其参数的列表.\n\n## 安装\n\n依赖关系:\n\n-   **git 1.7.3**或者以上\n\n#### Homebrew\n\n`hub`可以在macOS上通过安装[Homebrew](https://docs.brew.sh/Installation):\n\n```sh\n$ brew install hub\n$ hub version\ngit version 1.7.6\nhub version 2.2.3\n```\n\n#### Windows\n\n`hub`可以在Windows上通过安装[Scoop](http://scoop.sh/):\n\n```sh\n\u003e scoop install hub\n```\n\n#### Fedora Linux\n\n在Fedora上你可以通过DNF安装`hub`:\n\n```sh\n$ sudo dnf install hub\n$ hub version\ngit version 2.9.3\nhub version 2.2.9\n```\n\n#### Arch Linux\n\n在Arch Linux上你可以从官方存储库安装`hub`:\n\n```sh\n$ sudo pacman -S hub\n```\n\n#### 集成版本\n\n`hub`可以轻松安装为可执行文件.下载最新的[编译二进制文件](https://github.com/github/hub/releases),并将它放在可执行路径中的任何位置.\n\n#### 源-安装\n\n在你的[GOPATH](https://github.com/golang/go/wiki/GOPATH)已经设置后:\n\n```sh\n$ go get github.com/github/hub\n$ cd \"$GOPATH\"/src/github.com/github/hub\n$ make install prefix=/usr/local\n```\n\n编译的先决条件是:\n\n-   `make`\n-   [go1.8+](http://golang.org/doc/install)\n-   带有`Bundler`的`Ruby 1.9+`  - 用于生成man手册页\n\n## 别名\n\n当换成`git`别名时,使用hub感觉是最好的.这不危险;你的*普通的git命令都可以正常工作*.hub只是添加了一些糖.\n\n`hub alias`显示当前shell的说明.若带上`-s`标志,它会输出适合的`eval`脚本.\n\n例如:\n\n``` bash\n$ hub alias -s\nalias git=hub\n```\n\n你应该把这个命令放在你的`.bash_profile`或其他启动脚本:\n\n```sh\neval \"$(hub alias -s)\"\n```\n\n#### PowerShell\n\n如果您使用的是PowerShell,则可以为`hub`设置别名,只需要将以下内容放在PowerShell配置文件中(通常`~/Documents/WindowsPowerShell/Microsoft.PowerShell_profile.ps1`):\n\n```sh\nSet-Alias git hub\n```\n\n一种简单的方法是从PowerShell提示符运行以下命令:\n\n```sh\nAdd-Content $PROFILE \"`nSet-Alias git hub\"\n```\n\n注意:您需要重新启动PowerShell控制台才能获取更改.\n\n如果您的PowerShell配置文件不存在,则可以通过运行以下命令来创建它:\n\n```sh\nNew-Item -Type file -Force $PROFILE\n```\n\n### Shell tab-补全\n\nhub存储库包含bash,zsh和fish的tab-补全脚本.这些脚本会tab-补全了git附带的补全脚本.\n\n[安装说明](etc)\n\n-   [hub - bash](https://github.com/github/hub/blob/master/etc/hub.bash_completion.sh)\n-   [hub - zsh](https://github.com/github/hub/blob/master/etc/hub.zsh_completion)\n-   [hub - fish](https://github.com/github/hub/blob/master/etc/hub.fish_completion)\n\n## 元信息\n\n-   主页:\u003chttps://github.com/github/hub\u003e\n-   错误:\u003chttps://github.com/github/hub/issues\u003e\n-   作者:\u003chttps://github.com/github/hub/contributors\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinanf-boy%2Fhub-zh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchinanf-boy%2Fhub-zh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchinanf-boy%2Fhub-zh/lists"}