Skip to content

Commit 874ec35

Browse files
committed
Merge pull request #2 from andregirol/prefacio
Prefacio
2 parents 3e0ff38 + 641eabc commit 874ec35

File tree

7 files changed

+50
-49
lines changed

7 files changed

+50
-49
lines changed

book/02-git-basics/sections/tagging.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Now, when someone else clones or pulls from your repository, they will get all y
212212
==== Checking out Tags
213213

214214
You can't really check out a tag in Git, since they can't be moved around.
215-
If you want to put a version of your repository in your working directory that looks like a specific tag, you can create a new branch at a specific tag:
215+
If you want to put a version of your repository in your working directory that looks like a specific tag, you can create a new branch at a specific tag with `git checkout -b [branchname] [tagname]`:
216216

217217
[source,console]
218218
----

book/06-github/sections/3-maintaining.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ Simply change the default branch in the dropdown and that will be the default fo
323323
If you would like to transfer a project to another user or an organization in GitHub, there is a ``Transfer ownership'' option at the bottom of the same ``Options'' tab of your repository settings page that allows you to do this.
324324

325325
[[_transfer_project]]
326-
.Transfer a project to anther GitHub user or Organization.
326+
.Transfer a project to another GitHub user or Organization.
327327
image::images/maint-11-transfer.png[Transfer]
328328

329329
This is helpful if you are abandoning a project and someone wants to take it over, or if your project is getting bigger and want to move it into an organization.

book/07-git-tools/sections/advanced-merging.asc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $ git commit -am 'converted hello.rb to DOS'
4040
1 file changed, 7 insertions(+), 7 deletions(-)
4141
4242
$ vim hello.rb
43-
$ git diff -w
43+
$ git diff -b
4444
diff --git a/hello.rb b/hello.rb
4545
index ac51efd..e85207e 100755
4646
--- a/hello.rb
@@ -121,11 +121,11 @@ If for some reason you find yourself in a horrible state and just want to start
121121

122122
In this specific case, the conflicts are whitespace related. We know this because the case is simple, but it's also pretty easy to tell in real cases when looking at the conflict because every line is removed on one side and added again on the other. By default, Git sees all of these lines as being changed, so it can't merge the files.
123123

124-
The default merge strategy can take arguments though, and a few of them are about properly ignoring whitespace changes. If you see that you have a lot of whitespace issues in a merge, you can simply abort it and do it again, this time with `-Xignore-all-space` or `-Xignore-space-change`. The first option ignores changes in any **amount** of existing whitespace, the second ignores all whitespace changes altogether.
124+
The default merge strategy can take arguments though, and a few of them are about properly ignoring whitespace changes. If you see that you have a lot of whitespace issues in a merge, you can simply abort it and do it again, this time with `-Xignore-all-space` or `-Xignore-space-change`. The first option ignores whitespace **completely** when comparing lines, the second treats sequences of one or more whitespace characters as equivalent.
125125

126126
[source,console]
127127
----
128-
$ git merge -Xignore-all-space whitespace
128+
$ git merge -Xignore-space-change whitespace
129129
Auto-merging hello.rb
130130
Merge made by the 'recursive' strategy.
131131
hello.rb | 2 +-
@@ -178,7 +178,7 @@ dos2unix: converting file hello.theirs.rb to Unix format ...
178178
$ git merge-file -p \
179179
hello.ours.rb hello.common.rb hello.theirs.rb > hello.rb
180180
181-
$ git diff -w
181+
$ git diff -b
182182
diff --cc hello.rb
183183
index 36c06c8,e85207e..0000000
184184
--- a/hello.rb
@@ -195,7 +195,7 @@ index 36c06c8,e85207e..0000000
195195
hello()
196196
----
197197

198-
At this point we have nicely merged the file. In fact, this actually works better than the `ignore-all-space` option because this actually fixes the whitespace changes before merge instead of simply ignoring them. In the `ignore-all-space` merge, we actually ended up with a few lines with DOS line endings, making things mixed.
198+
At this point we have nicely merged the file. In fact, this actually works better than the `ignore-space-change` option because this actually fixes the whitespace changes before merge instead of simply ignoring them. In the `ignore-space-change` merge, we actually ended up with a few lines with DOS line endings, making things mixed.
199199

200200
If you want to get an idea before finalizing this commit about what was actually changed between one side or the other, you can ask `git diff` to compare what is in your working directory that you're about to commit as the result of the merge to any of these stages. Let's go through them all.
201201

@@ -222,11 +222,11 @@ index 36c06c8..44d0a25 100755
222222

223223
So here we can easily see that what happened in our branch, what we're actually introducing to this file with this merge, is changing that single line.
224224

225-
If we want to see how the result of the merge differed from what was on their side, you can run `git diff --theirs`. In this and the following example, we have to use `-w` to strip out the whitespace because we're comparing it to what is in Git, not our cleaned up `hello.theirs.rb` file.
225+
If we want to see how the result of the merge differed from what was on their side, you can run `git diff --theirs`. In this and the following example, we have to use `-b` to strip out the whitespace because we're comparing it to what is in Git, not our cleaned up `hello.theirs.rb` file.
226226

227227
[source,console]
228228
----
229-
$ git diff --theirs -w
229+
$ git diff --theirs -b
230230
* Unmerged path hello.rb
231231
diff --git a/hello.rb b/hello.rb
232232
index e85207e..44d0a25 100755
@@ -245,7 +245,7 @@ Finally, you can see how the file has changed from both sides with `git diff --b
245245

246246
[source,console]
247247
----
248-
$ git diff --base -w
248+
$ git diff --base -b
249249
* Unmerged path hello.rb
250250
diff --git a/hello.rb b/hello.rb
251251
index ac51efd..44d0a25 100755

book/08-customizing-git/sections/hooks.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Like many other Version Control Systems, Git has a way to fire off custom scripts when certain important actions occur.
66
There are two groups of these hooks: client-side and server-side.
77
Client-side hooks are triggered by operations such as committing and merging, while server-side hooks run on network operations such as receiving pushed commits.
8-
You can use these hooks for all sorts of reasons
8+
You can use these hooks for all sorts of reasons.
99

1010
==== Installing a Hook
1111

book/10-git-internals/sections/transfer-protocols.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ The client initiates a `fetch-pack` process that connects to an `upload-pack` pr
219219

220220
====== SSH
221221

222-
If you're doing the fetch over SSH, `fetch-pack` instead runs something like this:
222+
If you're doing the fetch over SSH, `fetch-pack` runs something like this:
223223

224224
[source,console]
225225
----

book/C-git-commands/1-git-commands.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ We use it to look for possible whitespace issues before committing with the `--c
102102

103103
We see how to check the differences between branches more effectively with the `git diff A...B` syntax in <<_what_is_introduced>>.
104104

105-
We use it to filter out whitespace differences with `-w` and how to compare different stages of conflicted files with `--theirs`, `--ours` and `--base` in <<_advanced_merging>>.
105+
We use it to filter out whitespace differences with `-b` and how to compare different stages of conflicted files with `--theirs`, `--ours` and `--base` in <<_advanced_merging>>.
106106

107107
Finally, we use it to effectively compare submodule changes with `--submodule` in <<_starting_submodules>>.
108108

@@ -192,7 +192,7 @@ The `git merge` command was first introduced in <<_basic_branching>>. Though it
192192

193193
We covered how to do a squashed merge (where Git merges the work but pretends like it's just a new commit without recording the history of the branch you're merging in) at the very end of <<_public_project>>.
194194

195-
We went over a lot about the merge process and command, including the `-Xignore-all-whitespace` command and the `--abort` flag to abort a problem merge in <<_advanced_merging>>.
195+
We went over a lot about the merge process and command, including the `-Xignore-space-change` command and the `--abort` flag to abort a problem merge in <<_advanced_merging>>.
196196

197197
We learned how to verify signatures before merging if your project is using GPG signing in <<_signing_commits>>.
198198

book/preface.asc

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,55 @@ Pro Git
66
:toclevels: 2
77

88
[preface]
9-
== Preface by Scott Chacon
9+
== Prefácio por Scott Chacon
1010

11-
Welcome to the second edition of Pro Git.
12-
The first edition was published over four years ago now.
13-
Since then a lot has changed and yet many important things have not.
14-
While most of the core commands and concepts are still valid today as the Git core team is pretty fantastic at keeping things backward compatible, there have been some significant additions and changes in the community surrounding Git.
15-
The second edition of this book is meant to address those changes and update the book so it can be more helpful to the new user.
11+
Bem vindo à segunda edição de Pro Git.
12+
A primeira edição foi publicada a mais de quatro anos.
13+
Desde então muita coisa mudou e ainda muitas coisas importantes não mudaram.
14+
Enquando a maioria dos comandos e conceitos fundamentais ainda são válidos hoje por conta da equipe do Git ser fantástica em manter as coisas retrocompatíveis, houveram algumas adições e modificações significativas na comunidade que envolve o Git.
15+
A segunda edição deste livro é destinada a pontuar essas mudanças e atualizar o livro pare que ele possa ser mais proveitoso aos novatos.
1616

17-
When I wrote the first edition, Git was still a relatively difficult to use and barely adopted tool for the harder core hacker.
18-
It was starting to gain steam in certain communities, but had not reached anywhere near the ubiquity it has today.
19-
Since then, nearly every open source community has adopted it.
20-
Git has made incredible progress on Windows, in the explosion of graphical user interfaces to it for all platforms, in IDE support and in business use.
21-
The Pro Git of four years ago knows about none of that.
22-
One of the main aims of this new edition is to touch on all of those new frontiers in the Git community.
17+
Quando eu escrevi a primeira edição deste livro, Git era ainda relativamente difícil de se usar e uma ferramenta pouco adotada pelos hackers mais hardcore.
18+
Ele estava começando a ganhar força em certas comunidades, mas não tinha chegado nada perto da ubiquidade que tem hoje.
2319

24-
The Open Source community using Git has also exploded.
25-
When I originally sat down to write the book nearly five years ago (it took me a while to get the first version out), I had just started working at a very little known company developing a Git hosting website called GitHub.
26-
At the time of publishing there were maybe a few thousand people using the site and just four of us working on it.
27-
As I write this introduction, GitHub is announcing our 10 millionth hosted project, with nearly 5 million registered developer accounts and over 230 employees.
28-
Love it or hate it, GitHub has heavily changed large swaths of the Open Source community in a way that was barely conceivable when I sat down to write the first edition.
20+
Desde então, praticamente todas as comunidades open source o adotaram.
21+
Git obteve um progresso incrível no Windows, com a explosão de interfaces gráficas criadas para ele, no suporte em IDEs e em uso corporativo.
22+
O Pro Git de quatro anos atrás não sabia de nada disso.
23+
Um dos principais objetivos dessa nova edição é abordar todas essas novas fronteiras na comunidade Git.
2924

30-
I wrote a small section in the original version of Pro Git about GitHub as an example of hosted Git which I was never very comfortable with.
31-
I didn't much like that I was writing what I felt was essentially a community resource and also talking about my company in it.
32-
While I still don't love that conflict of interests, the importance of GitHub in the Git community is unavoidable.
33-
Instead of an example of Git hosting, I have decided to turn that part of the book into more deeply describing what GitHub is and how to effectively use it.
34-
If you are going to learn how to use Git then knowing how to use GitHub will help you take part in a huge community, which is valuable no matter which Git host you decide to use for your own code.
25+
A comunidade Open Source usando git também explodiu.
26+
Quando eu originalmente sentei para escrever o livro cerca de cinco anos atrás (tomou-me um tempo para publicar a primeira versão), eu tinha acabado de conseguir emprego numa companhia pouco conhecida desenvolvendo um website de hospedagem de Git, chamado GitHub.
27+
No momento da publicação haviam talvez algumas milhares de pessoas usando o site e somente quatro de nós trabalhando nele.
28+
Enquanto escrevo essa introdução, GitHub está anunciando nosso décimio milionésimo projeto hospedado, com aproximadamente 5 milhões de contas de desenvolvedores cadastradas e mais de 230 funcionários.
29+
Ame-o ou Odeie-o, GitHub mudou drasticamente grandes esferas da comunidade Open Source de uma forma que era praticamente inconcebível quando sentei prara escrever a primeira edição.
3530

36-
The other large change in the time since the last publishing has been the development and rise of the HTTP protocol for Git network transactions. Most of the examples in the book have been changed to HTTP from SSH because it's so much simpler.
31+
Escrevi uma pequena seção na versão original de Pro Git sobre o GitHub como um exemplo de hospedagem Git que nunca me senti confortável com ela.
32+
Eu não gostava do fato que eu estava escrevendo algo que eu sentia que era um recurso da comunidade a ao mesmo tempo colocando minha empresa no meio.
33+
Embora eu ainda não ame esse conflito de interesses, a importância do GitHub na comunidade Git é inevitável.
34+
Ao invés de usar como exemplo de hospedagem Git, eu decidi transformar aquela parte do livro em uma descrição mais profunda do que é o GitHub e como usá-lo de forma mais eficiente.
35+
Se você aprender como usar o Git sabendo como usar o GitHub ajudará você a participar de uma imensa comunidade, o que é valioso não importando qual serviço de hospedagem Git você decidir usar para seus códigos.
3736

38-
It's been amazing to watch Git grow over the past few years from a relatively obscure version control system to basically dominating commercial and open source version control. I'm happy that Pro Git has done so well and has also been able to be one of the few technical books on the market that is both quite successful and fully open source.
37+
Outra mudança significativa na época desde a última publicação tem sido o desenvolvimento e crescimento do protocolo HTTP para transaçõps em rede do Git. A maioria dos exemplos foi mudada do SSH para o HTTP porque é muito mais simples.
3938

40-
I hope you enjoy this updated edition of Pro Git.
39+
Tem sido maravilhoso ver o Git crescer nos últimos anos a partir de um sistema de controle de versão relativamente obscuro para um sistema que basicamente domina os sistemas de controle de versão comerciais e open source. Eu estou feliz que Pro Git cumpriu bem o seu papel e também foi possível ser um dos poucos livros técnicos no mercado que obteve um sucesso considerável e é completamente open source.
4140

42-
[preface]
43-
== Preface by Ben Straub
41+
Espero que você aprecie essa versão atualizada de Pro Git.
4442

45-
The first edition of this book is what got me hooked on Git. This was my introduction to a style of making software that felt more natural than anything I had seen before. I had been a developer for several years by then, but this was the right turn that sent me down a much more interesting path than the one I was on.
43+
[preface]
44+
== Prefácio by Ben Straub
4645

47-
Now, years later, I'm a contributor to a major Git implementation, I've worked for the largest Git hosting company, and I've traveled the world teaching people about Git. When Scott asked if I'd be interested in working on the second edition, I didn't even have to think.
46+
A primeira edição deste livro foi o que me fez viciar em Git. Essa foi minha introdução a um estilo de produzir software de forma mais natural do que tudo que eu havia visto antes. Fui programador por muitos anos até então, mas essa foi a virada certa que me mostrou um caminho muito mais interessante no que eu estava.
4847

49-
It's been a great pleasure and privilege to work on this book. I hope it helps you as much as it did me.
48+
Agora, anos depois, eu contribuo com uma das implementação principais do Git, trabalhei para a maior companhia de hospedagem Git, e viajei o mundo ensinando as pessoas sobre Git. Quando Scott me perguntou se eu tinha interesse em trabalhar na segunda edição, eu nem pensei duas vezes.
5049

50+
Tem sido um grande prazer e privilégio trabalhar neste livro. Espero que ele o ajude tanto quanto ajudou a mim.
5151

5252
[preface]
53-
== Dedications
53+
== Dedicatória
54+
55+
_À minha esposa, Becky, sem a qual essa aventura nunca teria começado. — Ben_
5456

55-
_To my wife, Becky, without whom this adventure never would have begun. — Ben_
57+
_Essa edição é dedicada às minhas meninas.
58+
À minha esposa Jessica que me apoiou todos esses anos e à minha filha Josephine,
59+
que me apoiará quando eu estiver velho demais para entender o que está acontecendo. — Scott_
5660

57-
_This edition is dedicated to my girls.
58-
To my wife Jessica who has supported me for all of these years and to my daughter Josephine,
59-
who will support me when I'm too old to know what's going on. — Scott_

0 commit comments

Comments
 (0)