Skip to content

Commit 55d47a5

Browse files
committed
Merge remote-tracking branch 'progit/master' into sync
2 parents 22bb0cb + 0c09fcd commit 55d47a5

File tree

393 files changed

+14848
-2725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+14848
-2725
lines changed

.dependabot/config.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 1
2+
update_configs:
3+
# Update your Gemfile (& lockfiles) as soon as
4+
# new versions are published to the RubyGems registry
5+
- package_manager: "ruby:bundler"
6+
directory: "/"
7+
update_schedule: "live"
8+
9+
# Apply default reviewer and label to created
10+
# pull requests
11+
default_reviewers:
12+
- "ben"
13+
default_labels:
14+
- "dependabot"

.github/ISSUE_TEMPLATE/bug_report.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!-- Before filing a bug please check the following: -->
11+
<!-- * There's no existing/similar bug report. -->
12+
<!-- * This bug report is about a single actionable bug. -->
13+
<!-- * This bug is about the Pro Git book, version 2, English language. -->
14+
<!-- * This bug is about the book as found on the [website](https://www.git-scm.com/book/en/v2) or the pdf. -->
15+
<!-- * If you found a issue in the pdf/epub/mobi files, you've checked if the problem is also present in the Pro Git book on the [website](https://www.git-scm.com/book/en/v2). -->
16+
<!-- * This bug is **not** about a translation, if so please file a bug with the translation project. You can find a table of translation projects here: [progit2/TRANSLATING.md](https://github.com/progit/progit2/blob/master/TRANSLATING.md) -->
17+
<!-- * This bug is **not** about the git-scm.com site, if so please file a bug here: [git-scm.com/issues/new](https://github.com/git/git-scm.com/issues/new) -->
18+
<!-- * This bug is **not** about git the program itself, if so please file a bug here: [git-scm.com/community](https://git-scm.com/community) -->
19+
<!-- * This bug is **not** about Git for Windows, if so please file a bug here: [git-for-windows/git](https://github.com/git-for-windows/git). -->
20+
21+
**Which version of the book is affected?**
22+
<!-- It's important for us to know if the problem is in the source or in the tooling for the pdf/epub/mobi files. -->
23+
<!-- Therefore, please write whether the problem is with the files, the online book, or both. -->
24+
25+
**Describe the bug:**
26+
<!-- A clear and concise description of what the bug is. -->
27+
28+
**Steps to reproduce:**
29+
<!-- Please write the steps needed to reproduce the bug here. -->
30+
<!-- 1. Go to '...' -->
31+
<!-- 2. Click on '....' -->
32+
<!-- 3. Scroll down to '....' -->
33+
<!-- 4. See error -->
34+
35+
**Expected behavior:**
36+
<!-- A clear and concise description of what you expected to happen. -->
37+
38+
**Screenshots:**
39+
<!-- If applicable, add screenshots to help explain your problem. -->
40+
41+
**Additional context:**
42+
<!-- Add any other context about the problem here. -->
43+
<!-- You can also put references to similar bugs here. -->
44+
45+
**Desktop:**
46+
<!-- If you've used a desktop/laptop to access the content, please fill in this form. -->
47+
<!-- Example: Windows 10 Home Edition, Firefox, version 66.0.2 -->
48+
- Operating system:
49+
- Browser/application:
50+
- Browser/application version:
51+
52+
**Smartphone:**
53+
<!-- If you've used a smartphone to access the content, please fill in this form. -->
54+
<!-- Example: iPhone 6, iOS 12.2, Safari, version 22 -->
55+
- Device:
56+
- OS:
57+
- Browser/application:
58+
- Browser/application version:
59+
60+
**E-book reader:**
61+
<!-- If you've used a e-book reader to access the content, please fill in this form. -->
62+
<!-- Example: Amazon Kindle Paperwhite 10th generation, software update 5.11.1 -->
63+
- Device:
64+
- Software Update:

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ output
22
.DS_Store
33

44
# build artifacts
5+
Gemfile.lock
56
progit.html
67
progit.pdf
78
progit.pdfmarks
89
progit.epub
910
progit-kf8.epub
1011
progit.mobi
11-
12+
contributors.txt

.mailmap

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Jean-Noël Avila <[email protected]>
2+
Scott Chacon <[email protected]>

.tgitconfig

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[bugtraq]
2+
url = https://github.com/progit/progit2/issues/%BUGID%
3+
logregex = "(?:[Cc]lose[sd]?|[Ff]ix(?:e[sd])?|[Rr]esolve[sd]?):?\\s+(?:[Ii]ssues?\\s+#?|#)\\d+(?:(?:,|\\s+and)\\s+(?:[Ii]ssues?\\s+#?|#)\\d+)*\n(\\d+)"
4+
5+
[tgit]
6+
icon = Pro.ico

.travis.yml

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
11
language: ruby
2-
sudo: false
32
git:
43
depth: false
54
cache: bundler
65
before_install:
7-
- wget https://raw.githubusercontent.com/progit/progit2-pub/master/bootstrap.sh
8-
- sh bootstrap.sh
6+
- bundle install
7+
after_success:
8+
- script/tag_on_master
99
script: bundle exec rake book:build
10-
after_success: bundle exec rake book:tag
10+
env:
11+
secure: "O+YCTDgLfCYAJjjOv2sApDRV5NJe6pkhiYIkORFuf2flO8HE72fEtDRpSWh1vulnIH6AjRK2jH7C8qA3MVbUO8D0io+Ha+vnbMXIp1JPCptcJNEkJrW13VTR66SWOzsgLp3mCrIC+YdE2JoYWGcnDsRMQwdnrWnxBzSOd22ZKzU="
12+
13+
before_deploy: bundle install && bundle exec rake book:build
1114
deploy:
1215
provider: releases
13-
file_glob: true
1416
file:
15-
- progit*.epub
16-
- progit*.mobi
17-
- progit*.pdf
17+
- progit.epub
18+
- progit.mobi
19+
- progit.pdf
1820
skip_cleanup: true
1921
on:
2022
tags: true
21-
api-key: $GITHUB_API_TOKEN
23+
api-key:
24+
secure: "l3XdupX6dT48IoTieJXrd7Yx8+KhiR2QYrNrDzT6RKxA7UyXGSP/axsVerg7OjKfIHWZgDJRVzcc2RswE+Xjw9sOY8r2h2q9uCwj8G0EqtFbtgGK0La5LB0euh0tNJN8GLFj1OdSZGY7dWWK88GXeHCua2WSify0V79R4ClIM+s="
2225
branches:
2326
only:
2427
- master
2528
- /^2\.1(\.\d+)+$/
2629

27-
addons:
28-
apt:
29-
packages:
30-
- epubcheck
3130
notifications:
3231
email:
3332
on_success: never

A-git-in-other-environments.asc

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
[#A-git-in-other-environments]
1+
[[A-git-in-other-environments]]
22
[appendix]
3-
== 其它环境中的 Git
3+
== 在其它环境中使用 Git
44

5-
从头至尾读到了这里,你肯定已经掌握了不少使用 Git 命令行操作的知识。
6-
你学会了操作本地文件,通过网络连接你的仓库,以及与他人进行有效率的合作。
7-
但是故事并未就此结束;Git 通常只是更大的生态圈的一部分,在某些情况下使用终端并不是最合适的方式。
8-
现在就让我们来了解一下如何在其它类型的环境中更好地使用 Git,以及别的应用(包括你的)如何与 Git 进行协作。
5+
如果你读完了本书,那就已经掌握了很多在命令行中使用 Git 的知识了。
6+
你可以用它来处理本地文件,通过网络连接到他人的仓库,以及高效地与他人协同工作。
7+
不过故事到这儿还没结束。Git 通常还会作为一个组件在更大的生态系统中使用,
8+
而终端并不总是最佳的使用方式。现在我们来看看 Git 在其它环境中的使用,
9+
以及其它应用(包括你的应用)是如何与 Git 协同使用的。
910

1011
include::book/A-git-in-other-environments/sections/guis.asc[]
1112

1213
include::book/A-git-in-other-environments/sections/visualstudio.asc[]
1314

15+
include::book/A-git-in-other-environments/sections/visualstudiocode.asc[]
16+
1417
include::book/A-git-in-other-environments/sections/eclipse.asc[]
1518

19+
include::book/A-git-in-other-environments/sections/jetbrainsides.asc[]
20+
21+
include::book/A-git-in-other-environments/sections/sublimetext.asc[]
1622

1723
include::book/A-git-in-other-environments/sections/bash.asc[]
1824

@@ -22,4 +28,4 @@ include::book/A-git-in-other-environments/sections/powershell.asc[]
2228

2329
=== 总结
2430

25-
你已经学会了如何从日常工具中发挥 Git 的强大力量,以及从自己的程序中访问 Git 仓库的方法
31+
现在你已经学会如何在日常使用的工具中驾驭强大的 Git,以及如何在自己的程序中访问 Git 仓库了
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[[B-embedding-git-in-your-applications]]
2+
[appendix]
3+
== 在你的应用中嵌入 Git
4+
5+
如果你的应用程序的目标用户是开发者,那么在其中集成源码控制功能会让他们从中受益。
6+
甚至对于文档编辑器等并非面向程序员的应用,也可以从版本控制系统中受益,Git 的工作模式在多种场景下表现得都非常出色。
7+
8+
如果你想将 Git 整合进你的应用程序,那么通常有两种可行的选择:启动 shell 来调用 Git 的命令行程序,或者将 Git 库嵌入到你的应用中。
9+
10+
include::book/B-embedding-git/sections/command-line.asc[]
11+
12+
include::book/B-embedding-git/sections/libgit2.asc[]
13+
14+
include::book/B-embedding-git/sections/jgit.asc[]
15+
16+
include::book/B-embedding-git/sections/go-git.asc[]
17+
18+
include::book/B-embedding-git/sections/dulwich.asc[]
19+

B-embedding-git.asc

-14
This file was deleted.

0 commit comments

Comments
 (0)