You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/02-git-basics/sections/tagging.asc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -212,7 +212,7 @@ Now, when someone else clones or pulls from your repository, they will get all y
212
212
==== Checking out Tags
213
213
214
214
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]`:
Copy file name to clipboardExpand all lines: book/06-github/sections/3-maintaining.asc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -323,7 +323,7 @@ Simply change the default branch in the dropdown and that will be the default fo
323
323
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.
324
324
325
325
[[_transfer_project]]
326
-
.Transfer a project to anther GitHub user or Organization.
326
+
.Transfer a project to another GitHub user or Organization.
327
327
image::images/maint-11-transfer.png[Transfer]
328
328
329
329
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.
@@ -121,11 +121,11 @@ If for some reason you find yourself in a horrible state and just want to start
121
121
122
122
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.
123
123
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.
125
125
126
126
[source,console]
127
127
----
128
-
$ git merge -Xignore-all-space whitespace
128
+
$ git merge -Xignore-space-change whitespace
129
129
Auto-merging hello.rb
130
130
Merge made by the 'recursive' strategy.
131
131
hello.rb | 2 +-
@@ -178,7 +178,7 @@ dos2unix: converting file hello.theirs.rb to Unix format ...
@@ -195,7 +195,7 @@ index 36c06c8,e85207e..0000000
195
195
hello()
196
196
----
197
197
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.
199
199
200
200
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.
201
201
@@ -222,11 +222,11 @@ index 36c06c8..44d0a25 100755
222
222
223
223
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.
224
224
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.
226
226
227
227
[source,console]
228
228
----
229
-
$ git diff --theirs -w
229
+
$ git diff --theirs -b
230
230
* Unmerged path hello.rb
231
231
diff --git a/hello.rb b/hello.rb
232
232
index e85207e..44d0a25 100755
@@ -245,7 +245,7 @@ Finally, you can see how the file has changed from both sides with `git diff --b
Copy file name to clipboardExpand all lines: book/08-customizing-git/sections/hooks.asc
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@
5
5
Like many other Version Control Systems, Git has a way to fire off custom scripts when certain important actions occur.
6
6
There are two groups of these hooks: client-side and server-side.
7
7
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.
Copy file name to clipboardExpand all lines: book/C-git-commands/1-git-commands.asc
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ We use it to look for possible whitespace issues before committing with the `--c
102
102
103
103
We see how to check the differences between branches more effectively with the `git diff A...B` syntax in <<_what_is_introduced>>.
104
104
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>>.
106
106
107
107
Finally, we use it to effectively compare submodule changes with `--submodule` in <<_starting_submodules>>.
108
108
@@ -192,7 +192,7 @@ The `git merge` command was first introduced in <<_basic_branching>>. Though it
192
192
193
193
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>>.
194
194
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>>.
196
196
197
197
We learned how to verify signatures before merging if your project is using GPG signing in <<_signing_commits>>.
Copy file name to clipboardExpand all lines: book/preface.asc
+36-35Lines changed: 36 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -6,54 +6,55 @@ Pro Git
6
6
:toclevels: 2
7
7
8
8
[preface]
9
-
== Preface by Scott Chacon
9
+
== Prefácio por Scott Chacon
10
10
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.
16
16
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.
23
19
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.
29
24
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.
35
30
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.
37
36
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.
39
38
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.
41
40
42
-
[preface]
43
-
== Preface by Ben Straub
41
+
Espero que você aprecie essa versão atualizada de Pro Git.
44
42
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
46
45
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.
48
47
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.
50
49
50
+
Tem sido um grande prazer e privilégio trabalhar neste livro. Espero que ele o ajude tanto quanto ajudou a mim.
51
51
52
52
[preface]
53
-
== Dedications
53
+
== Dedicatória
54
+
55
+
_À minha esposa, Becky, sem a qual essa aventura nunca teria começado. — Ben_
54
56
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_
56
60
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